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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requery form

Status
Not open for further replies.

Gaylord

Technical User
Sep 26, 2002
49
DE
Hi,

I have a form that will ultimately have several hundred text boxes and radio button which link to the database by an incident number.... So when I select the number I want to query, the database is queried and text areas populated...

This works fine and with a smal number of objects it is easy to use the macro and the requery option. The propect of adding another 300 lines to that macro is quite daunting, so is there an easier method for requerying/refreshing the form?

Thanks

Jamie
 
Jamie,

If the form is bound to the table, then there is no relationship between the number of fields and the requery command. You requery the form, NOT each field.

If the form is NOT bound to the underlying table; then its a different story, and you would have to assign each value to its relavent control on the form (but not by "requerying"); if you're doing it this way then you're "doing it hard".

So .... make sure your form is bound to the table via the recordsource; then some simple code should allow you to select from a combo box, and sync all of the associated data on the form.

Let us know if this answers your question, or if you need further help,


Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Ah, that makes sense, thank for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top