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

referencing query fields in vb

Status
Not open for further replies.

Frank72

Technical User
Nov 13, 2001
57
IE
Hi,

Im trying to change a value in a field (warrantyRebateBatchNbr) using a list box value
something like:

Set qryRebateReport![warrantyrebatrebatchnbr] = Me![lstDateUpTo]

any ideas on the proper syntax or am i barking up the wrong tree all together?

thanks alot

frank
 
If you create a query, which has the criteria set to [forms]![frmName]![fieldName], it will either ask for the parameter value (if the form is not found or closed), or it will take the value contained in the referenced field & place it into the query criteria expression...

You could then call this query from code:
DoCmd.RunQuery "qryName"

James Goodman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top