var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Passing form data to Access query
This seems simple enough but I can't figure it out.
I have a series of queries - maybe 15 in all. Each has a field as follows:
Field: Net: ([DB_amount_11]+[cr_amount_11])
Each month I have to manually change the Net field to reflect the current month. ([DB_amount_12]+[cr_amount_12])
What I tried to do without success is create a form so I could change the month just once (on the form) and the queries would all update.
When I do this, instead of getting a value in the Net field, I get:
The question: is there a way to do this in the query design window? Or do I need to do this using VBA/SQL.
Thanks in advance for your assistance - I appreciate it
What I would do is set up my queries so that on the form I enter which month I want and have the data pull formt he different fields that relate to the month I chose.
In you if statemtn you would look at the value you passed to the query and..
Select iif([forms]![frmName]![Fieldname] =11, (Table1.[DB_amount_11]+Table1.[cr_amount_11]), [forms]![frmName]![Fieldname] = 12, (Table1.[DB_amount_12]+Table1.[cr_amount_12]), 0))as Net
I will let you work out the proper syntax, but it isn't to hard.