A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form field linked to query



 
 
Thread Tools Display Modes
  #1  
Old December 7th, 2005, 06:28 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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  
Old December 7th, 2005, 06:43 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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  
Old December 7th, 2005, 07:01 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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  
Old December 7th, 2005, 07:30 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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  
Old December 7th, 2005, 07:42 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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  
Old December 7th, 2005, 08:02 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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  
Old December 7th, 2005, 08:18 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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  
Old December 7th, 2005, 10:42 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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  
Old December 8th, 2005, 03:02 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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  
Old December 8th, 2005, 10:22 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:16 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.