Userform to enter entries and also search for and update entries in database

  • Re: Userform to enter entries and also search for and update entries in database


    There's nothing wrong with using a Variable multiple times, but you must be sure that the order it is used does not affect later code.


  • Re: Userform to enter entries and also search for and update entries in database


    royUK, I appreciate the help and advice, but when it comes to deleting an entry which is a multiple entry an error comes up, Run-time error '91': object var.. not set. the line


    Code
    c.EntireRow.Delete
  • Re: Userform to enter entries and also search for and update entries in database


    Hi,


    Everytime i try to delete an entry i get an RUn-time error '91':
    object var or with block var not set



    but on my other userforms with this code it works fine.

  • Re: Userform to enter entries and also search for and update entries in database


    The example userform contains references to sheets that are missing. I can't get the code to work how you have set it up.


    This might work


  • Re: Userform to enter entries and also search for and update entries in database


    Sorry, i copied the specific userform and relevant page to a new workbook because the other file was too large to upload, even after compressing it

  • Re: Userform to enter entries and also search for and update entries in database


    But that code did the job. Thank you royUk. This was very much appreciated

  • Re: Userform to enter entries and also search for and update entries in database


    Hi,


    This userform runs perfectly, but im having problems with the date. I have looked up formatting date from american to uk, using CDate and other examples but I haven't managed to make it work.


  • Re: Userform to enter entries and also search for and update entries in database


    Try using CLng


    Code
    strFind = CLng(Me.txtDate.Value) 'what to look for
  • Re: Userform to enter entries and also search for and update entries in database


    Hi RoyUk


    I am getting type mismatch errors when I use the find button, but even so for everything else the date is in American format.

  • Re: Userform to enter entries and also search for and update entries in database


    Without knowing if the dates are entered correctly as dates I can't say.

  • Re: Userform to enter entries and also search for and update entries in database


    The dates are entered by the user in the format 'dd/mm'yy' or 'dd/mm/yyyy' in a standard text box

  • Re: Userform to enter entries and also search for and update entries in database


    I still need to know how they appear on the street, they may be enterinfg as Text. Look at my examples of calendars on userforms, probably the combobox is the best one for you.


    Alternative DatePickers

  • Re: Userform to enter entries and also search for and update entries in database


    As in how they appear in the sheet? they appear in the 'short date' format in UK, so 'dd/mm/yyyy'.


    I have attempted to apply the code you suggested as follows:



    When it comes to adding it seems like I adapted the code correctly but when it comes to the other features; scroll bar, find i haven't managed to figure out the correct way to adapt it.


    But even so in my userform I inputted the following date '03/09/2014' but it saved in the sheet as 09/03/'2014'

  • Re: Userform to enter entries and also search for and update entries in database


    Hi


    On further attempts at adapting the code you suggested for the scrollbar I managed to change it to:



    This seems to work, but my other command buttons dont function still having difficulty with myListbox, and Find features. My attempt is below:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!