Querying Tables To Use As A Record Source On Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do you go about querying tables and using the merged information as a
record source for fields created on a form?

Thx
 
Open the form in design view.

Right click the form and select Properties.

Click the down arrow on the right of Record Source and select your query.
 
Karl,

I have done this several times but the results of my query are not
displaying in that field on my form.

Please advise.

beginnergirl
 
The question was how to use a query as record source on a form.

I do not understand your comment about a field. When you change a record
source for a form it does not change the fields of the form. Also bear in
mind that if it is a totals query the field that is summed is outputted as a
different name such as SumOfYourField instead of YourField.
 
Bear with me....

for example, my form requires two dates. The field I am referring to should
be the calculated # of days between those two dates. I went into the
properties of that field and selected my query that calculates that number
but it won't show up nor am I getting any of the typical error messages.
 
Is the calculation done in the query or in the text box of the form?

Post the formula you are using.
 
It is done in the query and works as i can see the results in the datasheet
view of my query.
 
Open the form in design view. Click on the text box, then right-click, and
select properties.
Click in the Control Source property and then on the down-arrow. Check and
see if the source field is listed the same.
Try removing any Format or Input Mask.

You did not post your formula.
 
My formula is pretty simple:

DaysBetween: [date of notification] - [date of authorization]

In my query table, it appears to be working and displays the number of days.

i.e. 10/30/06 - 10/01/06 = 29 days

So I inserted this query in the properties box control source of the field
that I want to display the 29 in but it just won't show up.
 
So I inserted this query in the properties box control source of the field
Wrong.

If the record source for your form has these fields then in the text box
control source you would put --
= [date of notification] - [date of authorization]
OR
= DateDiff("d", [date of notification], [date of authorization])

The easiest way though is in the design view of the query grid add your
formula --
DaysBetween: [date of notification] - [date of authorization]
to the Field row so it is an output from the query. Then for control souce
of the text box select the field [DaysBetween].



beginnergirl said:
My formula is pretty simple:

DaysBetween: [date of notification] - [date of authorization]

In my query table, it appears to be working and displays the number of days.

i.e. 10/30/06 - 10/01/06 = 29 days

So I inserted this query in the properties box control source of the field
that I want to display the 29 in but it just won't show up.

KARL DEWEY said:
Open the form in design view. Click on the text box, then right-click, and
select properties.
Click in the Control Source property and then on the down-arrow. Check and
see if the source field is listed the same.
Try removing any Format or Input Mask.

You did not post your formula.
 
Karl,

My apologies for taking so long with my response. Worked!!! Your patience
and assistance has been greatly appreciated.

Take care.

:-)

KARL DEWEY said:
Wrong.

If the record source for your form has these fields then in the text box
control source you would put --
= [date of notification] - [date of authorization]
OR
= DateDiff("d", [date of notification], [date of authorization])

The easiest way though is in the design view of the query grid add your
formula --
DaysBetween: [date of notification] - [date of authorization]
to the Field row so it is an output from the query. Then for control souce
of the text box select the field [DaysBetween].



beginnergirl said:
My formula is pretty simple:

DaysBetween: [date of notification] - [date of authorization]

In my query table, it appears to be working and displays the number of days.

i.e. 10/30/06 - 10/01/06 = 29 days

So I inserted this query in the properties box control source of the field
that I want to display the 29 in but it just won't show up.

KARL DEWEY said:
Open the form in design view. Click on the text box, then right-click, and
select properties.
Click in the Control Source property and then on the down-arrow. Check and
see if the source field is listed the same.
Try removing any Format or Input Mask.

You did not post your formula.

:

It is done in the query and works as i can see the results in the datasheet
view of my query.

:

Is the calculation done in the query or in the text box of the form?

Post the formula you are using.

:

Bear with me....

for example, my form requires two dates. The field I am referring to should
be the calculated # of days between those two dates. I went into the
properties of that field and selected my query that calculates that number
but it won't show up nor am I getting any of the typical error messages.

:

The question was how to use a query as record source on a form.

I do not understand your comment about a field. When you change a record
source for a form it does not change the fields of the form. Also bear in
mind that if it is a totals query the field that is summed is outputted as a
different name such as SumOfYourField instead of YourField.

:

Karl,

I have done this several times but the results of my query are not
displaying in that field on my form.

Please advise.

beginnergirl

:

Open the form in design view.

Right click the form and select Properties.

Click the down arrow on the right of Record Source and select your query.

:

How do you go about querying tables and using the merged information as a
record source for fields created on a form?

Thx
 
Glad to be able to help.

beginnergirl said:
Karl,

My apologies for taking so long with my response. Worked!!! Your patience
and assistance has been greatly appreciated.

Take care.

:-)

KARL DEWEY said:
So I inserted this query in the properties box control source of the field
Wrong.

If the record source for your form has these fields then in the text box
control source you would put --
= [date of notification] - [date of authorization]
OR
= DateDiff("d", [date of notification], [date of authorization])

The easiest way though is in the design view of the query grid add your
formula --
DaysBetween: [date of notification] - [date of authorization]
to the Field row so it is an output from the query. Then for control souce
of the text box select the field [DaysBetween].



beginnergirl said:
My formula is pretty simple:

DaysBetween: [date of notification] - [date of authorization]

In my query table, it appears to be working and displays the number of days.

i.e. 10/30/06 - 10/01/06 = 29 days

So I inserted this query in the properties box control source of the field
that I want to display the 29 in but it just won't show up.

:

Open the form in design view. Click on the text box, then right-click, and
select properties.
Click in the Control Source property and then on the down-arrow. Check and
see if the source field is listed the same.
Try removing any Format or Input Mask.

You did not post your formula.

:

It is done in the query and works as i can see the results in the datasheet
view of my query.

:

Is the calculation done in the query or in the text box of the form?

Post the formula you are using.

:

Bear with me....

for example, my form requires two dates. The field I am referring to should
be the calculated # of days between those two dates. I went into the
properties of that field and selected my query that calculates that number
but it won't show up nor am I getting any of the typical error messages.

:

The question was how to use a query as record source on a form.

I do not understand your comment about a field. When you change a record
source for a form it does not change the fields of the form. Also bear in
mind that if it is a totals query the field that is summed is outputted as a
different name such as SumOfYourField instead of YourField.

:

Karl,

I have done this several times but the results of my query are not
displaying in that field on my form.

Please advise.

beginnergirl

:

Open the form in design view.

Right click the form and select Properties.

Click the down arrow on the right of Record Source and select your query.

:

How do you go about querying tables and using the merged information as a
record source for fields created on a form?

Thx
 
Back
Top