I have a form with a dropdown and when clicked I would like the fields in the form to refresh. Currently they stay the same no matter which user is selected. I used Me![Time Cards Subform].Requery but this isn't working.
>> I used Me![Time Cards Subform].Requery but this isn't
>> working.
Russ,
I`m assuming from the name that this is possibly a subform within the main form? If so, is the name you`ve used above the name of the actual form or the name of the subform Control. You need to use the Control name when calling from the main form.
That's exactly right. When I use the record selector the records change but when I use the combobox they don't. I've tried the code in virtually every event for the form and combobox.
I say this all the time and I don't think hardly anyone agrees with me. If you want a 3 state interface (SELECT/ADD/EDIT) on a form it is far easier to NOT bind the controls to your tables. You can easily test your selected key field, if it's there use Dlookup or other method to populate your controls then when they want to save, validate it all and build an update query string to update your data. If the key is not found you don't have to go to newrec just enable the controls and at save validate, build an insert query and execute it and the been to select state. Also if you want to lock only one record into place when you're editing, if you have your controls bound to your data source and your user spins the mouse wheel your records go zooming even if you set the form to cycle only the current record. I started out with nothing, and I still have most of it.
What you said makes sense and I'll use it on future apps unfortunately I can't go back and make those kind of changes beacuse of time. I need to understand why the record selector works and the combobox selection doesn't.
What is your RecordSourceType and Recordsource for the combo box that you want to use as a record selector? I started out with nothing, and I still have most of it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.