Search results

  1. G

    MS Access vba password problem

    At the time I managed to recreate the database VBA :-). Thanks for the suggestions. Ginny
  2. G

    VBA - create SQL statement using selections from Listbox as parameters

    Yoo Hoo - worked. Thanks to all for giving your time and thoughts on this. If anyone wants to see the expanded code where criteria from more than 1 Listbox is used I'm attaching it here. This is probably only beginner stuff, but it's brought me one step further in my knowledge of DBs. If...
  3. G

    VBA - create SQL statement using selections from Listbox as parameters

    Hi JHB Not sure yet, I hope so. I'm working on my code in my actual database. I'll close the thread when I get it working. Thanks for your time. Much appreciated. rgs Ginny
  4. G

    VBA - create SQL statement using selections from Listbox as parameters

    Hi all, I seem to have solved the problem when creating a cut-down version of what I need. This appears to work. I think I was making it too complicated and adding in extra to the wording of the WHERE statement!! All I needed was the variables. Now I just need to replicate this for my actual...
  5. G

    VBA - create SQL statement using selections from Listbox as parameters

    Thanks JHB for your reply. My statement gets assigned to the variable strProducts and works perfectly without the extra quotas when I type the statement myself, but when I use Access Listbox within the statement it is adding the extra quotas and my coding fails!! I'm stuck on it. I'm away for...
  6. G

    VBA - create SQL statement using selections from Listbox as parameters

    Hi all, I'm using MS Access 2007. I am trying to create a SQL statement 'on the fly' in VBA to gather user information to populate a template which is created using an Excel Template. The SQL statement queries a table to extract 3 fields. Field 1 populates a combobox on my form and 1 item is...
  7. G

    Subform unbound textbox value not updating on main form open

    Yes, thank you. I was leaving out the .Form. before the function and I had it in the On Open event. I tried it in the On Load and all is now working!!! Thanks to both of you for the help. (RuralGuy, you have helped me before :-), as always, very grateful. rgs Ginny
  8. G

    Subform unbound textbox value not updating on main form open

    Public Function Update_Hours() Dim rslt As Double rslt = 0 rslt = Nz(Textbox1, 0) + Nz(Textbox2, 0) ... me.hoursTextbox.Value = rslt End Function I tried putting the calculation directly into the control of the hoursTextbox, but when I opened the form which populate with the data from the...
  9. G

    Subform unbound textbox value not updating on main form open

    Hi RuralGuy Thanks for replying. Yes, all other controls are working and displaying values correctly. The underlying tables get updated also. I have the calculation for the unbound textbox in the Public Function within the form. I call the function in the OnOpen event on the form. So I...
  10. G

    Subform unbound textbox value not updating on main form open

    Hi, I have a subform which is linked to a table on which I have a set of comboboxes and textboxes. When data in the comboboxes is chosen, the textboxes populate with numbers and the underlying table is populated. I also have an unbound textbox which calculates using a function the sum of the...
  11. G

    Form combo dropdown

    Hi YNWA I was making it too complicated! It does work using a table and a query, after I watched a video on youTube I realised I didn't need to set up a relationship beforehand. The coding in the AfterUpdate event handled it well. Thanks for pointing me in the right direction. rgs Ginny
  12. G

    Form combo dropdown

    Hi all, I'm wondering if the following logic should work. I don't want to waste too much time on it, if it's an impossibility. Your opinion would be much appreciated. I have a form on which I have 2 combo boxes. I want the 2nd combo box to filter it's list depending on the value in the 1st...
  13. G

    Form Controls - dynamically creating

    Here's a picture of 2 forms, both take input. They are based on a query and a table with a unique number identifying the person. The set of people change over time, so I need to run the query to identify them for the form. The table of days and type of attendance stay as is for data input...
  14. G

    Form Controls - dynamically creating

    Paul, I left out one vital piece of information. While the names of the people will be drawn from the query and will not be subject to change, the associated textboxes or fields will be input fields. I think that's where my main problem lies. rgs Ginny
  15. G

    Form Controls - dynamically creating

    Thanks, I'll have a look. Ginny
  16. G

    Form Controls - dynamically creating

    Btw the reason I am trying to achieve this is that I need to show all people on the form at the same time. I can create a form with a subform for the extra fields, but once there is a subform I can't have a continuous form! Ginny
  17. G

    Form Controls - dynamically creating

    Hi Paul, Thanks for replying to me. I have a query which returns the current set of people (records). The query will give different results each week. This set of records populates a set of textboxes on my form. The way I have it set up is that by a count of the people query makes the...
  18. G

    Form Controls - dynamically creating

    Hi all, I have a form which I want to contain a list of people's names and for each person there are a set of textboxes which link to a querys in the background to show a drop down list. On form load a query triggers to give me the current list of people and only that number of controls...
  19. G

    In cell List box to return adjacent value

    Hi all, I'm creating an input sheet for a friend using Excel to simplify the collection of data. I have a list box set up in a set of cells which contains a listing of codes. What my friend wants is for the inputter to be able to choose one of these codes, but for the return value in that cell...
  20. G

    Worksheet Change Events

    Oh, I forgot to say, that while the 2 sets of code were identical, they were working on separate cell ranges. I played around with IF statements and I have finally got the 3 pieces of code to work within the 'worksheet change' area, and I am happy with my program. Thanks all, for a wonderful...
Top Bottom