Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

requery not working

Status
Not open for further replies.

rry2k

Programmer
Jun 28, 2001
678
US
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.

Thanks for the help..Russ
 
>> 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.

Sorry if this is totally of track,

Taff
 
I tried Me![Time Cards Subform].Refresh. .Refresh isn't an option in intelisense only requery which doesn't work.

I'd appreciate another suggestion.
Thanks..Russ
 
Are you trying to sync the rest of the form's field's records with the combo box entry? I started out with nothing, and I still have most of it.
 
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.

Thanks..Russ
 
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.

Thanks..Russ
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top