Fields from Form to Query

  • Thread starter Thread starter Leslie
  • Start date Start date
L

Leslie

Hi,

I have a database that I want to use to feed data to
another database. I can query out the fields I need from
the first database, but I need to add fields to each
record. The new fields will all contain the same data
which I will have the user input into a form (TransData).

So, my source database supplies the fields: Acct, Dept,
Amount. I need to add non-existing fields to each record,
each containing the same values like FY (04), TransType
(DC), Date(2/15/04) the values of which are in the form
(TransData) and needed in my destination database. The
values on the form can change, but when the query is
created, within the query should all be the same for each
record. I can do this in a report, but I would like to do
this in a query so that I can append the results in the
destination database.

In short, how would I add these fields, the fields and
values defined in a form, to my query?

I hope this makes sense and appreciate any help.

Leslie
 
Leslie,

Probably the most straighforward way is to reference the form controls
directly in the query. For example, in the Field row of a blank column
in your query design grid, put...
FY: [Forms]![TransData]![NameOfControl]
 
Thanks Steve. When I tried that yesterday prior to
posting it didn't work, but today it seems to...
-----Original Message-----
Leslie,

Probably the most straighforward way is to reference the form controls
directly in the query. For example, in the Field row of a blank column
in your query design grid, put...
FY: [Forms]![TransData]![NameOfControl]

--
Steve Schapel, Microsoft Access MVP

Hi,

I have a database that I want to use to feed data to
another database. I can query out the fields I need from
the first database, but I need to add fields to each
record. The new fields will all contain the same data
which I will have the user input into a form (TransData).

So, my source database supplies the fields: Acct, Dept,
Amount. I need to add non-existing fields to each record,
each containing the same values like FY (04), TransType
(DC), Date(2/15/04) the values of which are in the form
(TransData) and needed in my destination database. The
values on the form can change, but when the query is
created, within the query should all be the same for each
record. I can do this in a report, but I would like to do
this in a query so that I can append the results in the
destination database.

In short, how would I add these fields, the fields and
values defined in a form, to my query?

I hope this makes sense and appreciate any help.

Leslie
.
 
Back
Top