MilitaryDonut
asked on
Running a query inside of open form
Hello experts!
OK here is what I am trying to accomplish:
I would like to have a form with an unbound drop down box that is selecting a date field off of my table.
No problem about that&
I would then like to take this field and have a second (sub) form become visible and update or refresh based on that selection in my main form using the afterupdate (or the what I have setup now is to click a button to run a query) on the field.
So when the user clicks and selects a date, the subform becomes visible and shows the field(s) I want the user to update.
What I have is a table that not all the fields are entered at time of data entry. The user goes back to the table and updates later only after further information is received later.
Example is this: The user puts hours into the boxes every day for 5 days&..closes and 5 days later the user goes back and puts a dollar amount that is spent on materials which then is used to calculate a total owed a customer for a final bill.
The user only needs to modify this 1 field in the table but only done at the end of the work when materials are added at the end of the work week. I only want to have visible these 2 fields on the form.
I have my form setup&.I just need to know now how to take my query that runs outside of my form and make this visible and run inside my current open form&.
OK here is what I am trying to accomplish:
I would like to have a form with an unbound drop down box that is selecting a date field off of my table.
No problem about that&
I would then like to take this field and have a second (sub) form become visible and update or refresh based on that selection in my main form using the afterupdate (or the what I have setup now is to click a button to run a query) on the field.
So when the user clicks and selects a date, the subform becomes visible and shows the field(s) I want the user to update.
What I have is a table that not all the fields are entered at time of data entry. The user goes back to the table and updates later only after further information is received later.
Example is this: The user puts hours into the boxes every day for 5 days&..closes and 5 days later the user goes back and puts a dollar amount that is spent on materials which then is used to calculate a total owed a customer for a final bill.
The user only needs to modify this 1 field in the table but only done at the end of the work when materials are added at the end of the work week. I only want to have visible these 2 fields on the form.
I have my form setup&.I just need to know now how to take my query that runs outside of my form and make this visible and run inside my current open form&.
Let me rephrase your question to see if I understand it correctly: you want a new form to open after a date was entered. This form shows existing records (of the entered date) with one column editable where the materials spent can be entered. You have query that already shows the record, you only need a form. Correct?
As a first poke, how far do you get by:
1. generating a form using the wizard based on the existing query?
2. Add a docmd.openform... line in the afterupdate of the date entry box?
As a first poke, how far do you get by:
1. generating a form using the wizard based on the existing query?
2. Add a docmd.openform... line in the afterupdate of the date entry box?
ASKER
yes without this field....maybe reuse and get rid of the other fields not needed?
tbeernot, MilitaryDonut
i will leave you two on this...
i will leave you two on this...
ASKER
tbeernot:
Yes....but I would like the "query" to open inside my form without running outside the form...I click "run query" and instead of opening outside of form...how can I get it to open inside the current open form?
Yes....but I would like the "query" to open inside my form without running outside the form...I click "run query" and instead of opening outside of form...how can I get it to open inside the current open form?
Not being 100% certain what you mean, but would a subform solve your problem? A subform is a form embedded into another. First you create a form based on the query and then drag that form on the existing one.
ASKER
Sure...I created the form from the query but can't seem to figure out how to get the form to open inside my current open form when I click my command button....is there a way to get the form to open inside my current open form?
My drop down boxes are all "unbound"
My drop down boxes are all "unbound"
ASKER
Oh...I have dropped the "subform" inside the main form...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
do you already have a data entry form?