BigRob
BigRob

Reputation: 160

Inserting a query with a 'static' form field into a table

i'm trying to keep a record of which customers have received which newsletters. I have a query called

 TempQuery

I want to take the field

TempQuery.CustID

That consists of several numerical id's and combine it with two static values specified on a form

Forms![frmAddCorrespondence]![txtNID]
Forms![frmAddCorrespondence]![txtDate]

such that I end up with something like

CustID NID Date
1      5    28/03/2011
3      5    28/03/2011
14     5    28/03/2011
56     5    28/03/2011

Again the fields NID and Date will be the same values for each individual insert specified on frmAddCorrespondence and the CustID's are pulled from TempQuery.

I'd like this to be a query from which the data can be inserted into a log table of all our past correspondences.

Any help is greatly appreciated Thanks, Rob

Upvotes: 0

Views: 387

Answers (1)

Beth
Beth

Reputation: 9617

you want a full outer join between your temp query and the date and ID entered at runtime?

If so, you can pass the two new column values (ID and date) as parameters to your query. Just create a new query based on your existing one and add the two control references as new columns.

Is that what you wanted?


In response to your comment, yes, you can create a second append query in Access that takes all the columns from your query and adds the two parameters from the controls on your form.

Upvotes: 1

Related Questions