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

Update query fields from a form

Status
Not open for further replies.
Nov 6, 2002
89
CH
Hi

Can you help me regarding the following:

I have a form with the fields "January", "February", etc.
How can I achieve that when a user enters data (numbers) into these fields, a query which uses this data (for a calculation) is updated? I tried with a macro, but the macro only updates query data, if the query is open.

I am asking you this question, because on the form is a text box that shows the calculated query field. Logically, this text box on the form should always change when a users enters data into the fields "January", etc.

Thanks.

Stefan

 
hi,

the question is not clear, pl. little more clear please

Shyam Shyam
cwizshyam@yahoo.com
 
Hi Stefan,
Try this...

Dim sql as String
Dim str1 as String

str1=field1.text
sql="......where/having table.id/criteria = '" & str1 & "'
Docmd.RunSQL sql

Hope this helps.
[pc]

In the sweat of thy brow shall you eat your bread
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top