If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Form field linked to query
I have a subform that has 2 cbos. One for the month and one for the year.
These control the output for a query. I would like to have a field on this subform that will display the results of the query when the user selects the month and year. My problems a 1. Hhow do I get the query to update after the user selects the month and year 2. How do I get the field to link with this query result? Thanks for the help |
#2
|
|||
|
|||
Form field linked to query
Put logic in the combo box's AfterUpdate event to refresh the subform. Since
you can't be certain of what order the users will select the month and year, you'll have to put the logic in both places (or, better still, write a routine that both AfterUpdate events can call) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I have a subform that has 2 cbos. One for the month and one for the year. These control the output for a query. I would like to have a field on this subform that will display the results of the query when the user selects the month and year. My problems a 1. Hhow do I get the query to update after the user selects the month and year 2. How do I get the field to link with this query result? Thanks for the help |
#3
|
|||
|
|||
Form field linked to query
My problem is that I don't know the logic to put in. Also, how can I get
this form field to link with the query to show the results in the field? "Douglas J Steele" wrote: Put logic in the combo box's AfterUpdate event to refresh the subform. Since you can't be certain of what order the users will select the month and year, you'll have to put the logic in both places (or, better still, write a routine that both AfterUpdate events can call) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I have a subform that has 2 cbos. One for the month and one for the year. These control the output for a query. I would like to have a field on this subform that will display the results of the query when the user selects the month and year. My problems a 1. Hhow do I get the query to update after the user selects the month and year 2. How do I get the field to link with this query result? Thanks for the help |
#4
|
|||
|
|||
Form field linked to query
Me.subformcontrolname.Form.Refresh
I don't understand what your second question means. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... My problem is that I don't know the logic to put in. Also, how can I get this form field to link with the query to show the results in the field? "Douglas J Steele" wrote: Put logic in the combo box's AfterUpdate event to refresh the subform. Since you can't be certain of what order the users will select the month and year, you'll have to put the logic in both places (or, better still, write a routine that both AfterUpdate events can call) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I have a subform that has 2 cbos. One for the month and one for the year. These control the output for a query. I would like to have a field on this subform that will display the results of the query when the user selects the month and year. My problems a 1. Hhow do I get the query to update after the user selects the month and year 2. How do I get the field to link with this query result? Thanks for the help |
#5
|
|||
|
|||
Form field linked to query
I am trying to get the form field's control source to be the query. Whenever
I link it, it gives me the Name? in the form field. My question is what do I need to do to link this field to the query when my main form's control source is a seperate table? "Douglas J Steele" wrote: Me.subformcontrolname.Form.Refresh I don't understand what your second question means. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... My problem is that I don't know the logic to put in. Also, how can I get this form field to link with the query to show the results in the field? "Douglas J Steele" wrote: Put logic in the combo box's AfterUpdate event to refresh the subform. Since you can't be certain of what order the users will select the month and year, you'll have to put the logic in both places (or, better still, write a routine that both AfterUpdate events can call) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I have a subform that has 2 cbos. One for the month and one for the year. These control the output for a query. I would like to have a field on this subform that will display the results of the query when the user selects the month and year. My problems a 1. Hhow do I get the query to update after the user selects the month and year 2. How do I get the field to link with this query result? Thanks for the help |
#6
|
|||
|
|||
Form field linked to query
Still doesn't make any sense to me. What you mean by getting a form field's
control source to be a query? Do you mean you're trying to have the query use the value that's in the control as a parameter? If so, where's the field: on the form, or on the subform? How are you referring to it in the query? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I am trying to get the form field's control source to be the query. Whenever I link it, it gives me the Name? in the form field. My question is what do I need to do to link this field to the query when my main form's control source is a seperate table? "Douglas J Steele" wrote: Me.subformcontrolname.Form.Refresh I don't understand what your second question means. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... My problem is that I don't know the logic to put in. Also, how can I get this form field to link with the query to show the results in the field? "Douglas J Steele" wrote: Put logic in the combo box's AfterUpdate event to refresh the subform. Since you can't be certain of what order the users will select the month and year, you'll have to put the logic in both places (or, better still, write a routine that both AfterUpdate events can call) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I have a subform that has 2 cbos. One for the month and one for the year. These control the output for a query. I would like to have a field on this subform that will display the results of the query when the user selects the month and year. My problems a 1. Hhow do I get the query to update after the user selects the month and year 2. How do I get the field to link with this query result? Thanks for the help |
#7
|
|||
|
|||
Form field linked to query
I need the result of the query to display in the field I have on my subform.
When the user selects the month and year, I want the query to run using the after update feature and the result will display in this field I have on my subform. When I am linking this subform field to the query I am using the Expression Builder in the Control Source box to find the query and the query field i want displayed but it gives the #Name? in the subform field. "Douglas J Steele" wrote: Still doesn't make any sense to me. What you mean by getting a form field's control source to be a query? Do you mean you're trying to have the query use the value that's in the control as a parameter? If so, where's the field: on the form, or on the subform? How are you referring to it in the query? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I am trying to get the form field's control source to be the query. Whenever I link it, it gives me the Name? in the form field. My question is what do I need to do to link this field to the query when my main form's control source is a seperate table? "Douglas J Steele" wrote: Me.subformcontrolname.Form.Refresh I don't understand what your second question means. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... My problem is that I don't know the logic to put in. Also, how can I get this form field to link with the query to show the results in the field? "Douglas J Steele" wrote: Put logic in the combo box's AfterUpdate event to refresh the subform. Since you can't be certain of what order the users will select the month and year, you'll have to put the logic in both places (or, better still, write a routine that both AfterUpdate events can call) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I have a subform that has 2 cbos. One for the month and one for the year. These control the output for a query. I would like to have a field on this subform that will display the results of the query when the user selects the month and year. My problems a 1. Hhow do I get the query to update after the user selects the month and year 2. How do I get the field to link with this query result? Thanks for the help |
#8
|
|||
|
|||
Form field linked to query
If the query isn't the recordsource for the form, the only way to get a
result from it would be to use DLookup. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I need the result of the query to display in the field I have on my subform. When the user selects the month and year, I want the query to run using the after update feature and the result will display in this field I have on my subform. When I am linking this subform field to the query I am using the Expression Builder in the Control Source box to find the query and the query field i want displayed but it gives the #Name? in the subform field. "Douglas J Steele" wrote: Still doesn't make any sense to me. What you mean by getting a form field's control source to be a query? Do you mean you're trying to have the query use the value that's in the control as a parameter? If so, where's the field: on the form, or on the subform? How are you referring to it in the query? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I am trying to get the form field's control source to be the query. Whenever I link it, it gives me the Name? in the form field. My question is what do I need to do to link this field to the query when my main form's control source is a seperate table? "Douglas J Steele" wrote: Me.subformcontrolname.Form.Refresh I don't understand what your second question means. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... My problem is that I don't know the logic to put in. Also, how can I get this form field to link with the query to show the results in the field? "Douglas J Steele" wrote: Put logic in the combo box's AfterUpdate event to refresh the subform. Since you can't be certain of what order the users will select the month and year, you'll have to put the logic in both places (or, better still, write a routine that both AfterUpdate events can call) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I have a subform that has 2 cbos. One for the month and one for the year. These control the output for a query. I would like to have a field on this subform that will display the results of the query when the user selects the month and year. My problems a 1. Hhow do I get the query to update after the user selects the month and year 2. How do I get the field to link with this query result? Thanks for the help |
#9
|
|||
|
|||
Form field linked to query
I am not familiar with DLookup. Can you give me a sample of how this looks?
"Douglas J. Steele" wrote: If the query isn't the recordsource for the form, the only way to get a result from it would be to use DLookup. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I need the result of the query to display in the field I have on my subform. When the user selects the month and year, I want the query to run using the after update feature and the result will display in this field I have on my subform. When I am linking this subform field to the query I am using the Expression Builder in the Control Source box to find the query and the query field i want displayed but it gives the #Name? in the subform field. "Douglas J Steele" wrote: Still doesn't make any sense to me. What you mean by getting a form field's control source to be a query? Do you mean you're trying to have the query use the value that's in the control as a parameter? If so, where's the field: on the form, or on the subform? How are you referring to it in the query? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I am trying to get the form field's control source to be the query. Whenever I link it, it gives me the Name? in the form field. My question is what do I need to do to link this field to the query when my main form's control source is a seperate table? "Douglas J Steele" wrote: Me.subformcontrolname.Form.Refresh I don't understand what your second question means. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... My problem is that I don't know the logic to put in. Also, how can I get this form field to link with the query to show the results in the field? "Douglas J Steele" wrote: Put logic in the combo box's AfterUpdate event to refresh the subform. Since you can't be certain of what order the users will select the month and year, you'll have to put the logic in both places (or, better still, write a routine that both AfterUpdate events can call) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I have a subform that has 2 cbos. One for the month and one for the year. These control the output for a query. I would like to have a field on this subform that will display the results of the query when the user selects the month and year. My problems a 1. Hhow do I get the query to update after the user selects the month and year 2. How do I get the field to link with this query result? Thanks for the help |
#10
|
|||
|
|||
Form field linked to query
See
http://msdn.microsoft.com/library/en...HV05187182.asp -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I am not familiar with DLookup. Can you give me a sample of how this looks? "Douglas J. Steele" wrote: If the query isn't the recordsource for the form, the only way to get a result from it would be to use DLookup. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I need the result of the query to display in the field I have on my subform. When the user selects the month and year, I want the query to run using the after update feature and the result will display in this field I have on my subform. When I am linking this subform field to the query I am using the Expression Builder in the Control Source box to find the query and the query field i want displayed but it gives the #Name? in the subform field. "Douglas J Steele" wrote: Still doesn't make any sense to me. What you mean by getting a form field's control source to be a query? Do you mean you're trying to have the query use the value that's in the control as a parameter? If so, where's the field: on the form, or on the subform? How are you referring to it in the query? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I am trying to get the form field's control source to be the query. Whenever I link it, it gives me the Name? in the form field. My question is what do I need to do to link this field to the query when my main form's control source is a seperate table? "Douglas J Steele" wrote: Me.subformcontrolname.Form.Refresh I don't understand what your second question means. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... My problem is that I don't know the logic to put in. Also, how can I get this form field to link with the query to show the results in the field? "Douglas J Steele" wrote: Put logic in the combo box's AfterUpdate event to refresh the subform. Since you can't be certain of what order the users will select the month and year, you'll have to put the logic in both places (or, better still, write a routine that both AfterUpdate events can call) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Todd" wrote in message ... I have a subform that has 2 cbos. One for the month and one for the year. These control the output for a query. I would like to have a field on this subform that will display the results of the query when the user selects the month and year. My problems a 1. Hhow do I get the query to update after the user selects the month and year 2. How do I get the field to link with this query result? Thanks for the help |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Form, Subform, Tab key | 2nd_Stage_User | Using Forms | 17 | August 25th, 2006 12:30 AM |
Multiple Options Group | Patty Stoddard | Using Forms | 19 | August 4th, 2005 02:30 PM |
Union Query Not Returning A Value | Jeff G | Running & Setting Up Queries | 2 | October 19th, 2004 05:47 PM |
Display Parameter from Form on Report | sara | Setting Up & Running Reports | 10 | July 19th, 2004 04:54 PM |
Recordset in subform based on field in parent form | Lyn | General Discussion | 15 | June 14th, 2004 03:10 PM |