B
BlueWolverine
Hello,
Running Access 2003 on XP Pro.
I am trying to write a document generator; said documents are based on the
data in the master table.
I want to write a query that populates based on the choices made on a form.
The problem is I want 1 query to do it, instead of a ton of them.
Here's what I've got. a document is defined by Day of the Week and Fleet
Activity.
So "Monday DC" would be a unique document.
So there are two fields in the picker form. "Day of the Week" and "Fleet
Activity".
I want a query to pull all the records out of the table for (in this
example) Monday and DC. The catch is that since I did this originally in
Excel, I have a column for each day of the week, and one for each Activity,
such that I can't have the query look for Monday in Day of the Week, It would
look for True under Monday. Well what if it's Tuesday? It won't find True
under Monday (unless it's both).
The same problem applies to the fleet activity.
So here's what I want in pseudo-fake-Ijustmadeitup code.
formname = bob
Day of the Week Textbox = Dotw
Fleet Activity Textbox = FAT
Return all records where rec_id.Dotw = True and rec_id.FAT = True
End pseudocode
So the idea is not to have the value in the field of the record be flexible,
it's the name of the field that's flexible. I would rather not do it with
VBA but I can if that's what is needed.
Best ideas? Thank you so much.
Running Access 2003 on XP Pro.
I am trying to write a document generator; said documents are based on the
data in the master table.
I want to write a query that populates based on the choices made on a form.
The problem is I want 1 query to do it, instead of a ton of them.
Here's what I've got. a document is defined by Day of the Week and Fleet
Activity.
So "Monday DC" would be a unique document.
So there are two fields in the picker form. "Day of the Week" and "Fleet
Activity".
I want a query to pull all the records out of the table for (in this
example) Monday and DC. The catch is that since I did this originally in
Excel, I have a column for each day of the week, and one for each Activity,
such that I can't have the query look for Monday in Day of the Week, It would
look for True under Monday. Well what if it's Tuesday? It won't find True
under Monday (unless it's both).
The same problem applies to the fleet activity.
So here's what I want in pseudo-fake-Ijustmadeitup code.
formname = bob
Day of the Week Textbox = Dotw
Fleet Activity Textbox = FAT
Return all records where rec_id.Dotw = True and rec_id.FAT = True
End pseudocode
So the idea is not to have the value in the field of the record be flexible,
it's the name of the field that's flexible. I would rather not do it with
VBA but I can if that's what is needed.
Best ideas? Thank you so much.