Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can one run an apend query from an after update event with values ... 1

Status
Not open for further replies.

Focusfocs

Programmer
May 3, 2004
35
US
Hello All,
The questions are: Can a person run an apend query from an after update event using values that are supplied by unbound textboxes on the form? If so how? TIA
 
How are ya Focusfocs . . . . .
Focusfocs said:
[blue]Can a person run an apend query from an after update event using values that are supplied by unbound textboxes on the form?[/blue]
Yes! . . . using the [blue]DoCmd.OpenQuery "[purple]QueryName[/purple]"[/blue]

In the design view of the query, set custom fields with form references to their targets:
Code:
[blue]Dat1:Forms!YourFormName!YourTextboxName[/blue]
Of course the referenced form has to be open . . .

Be careful appending [blue]pimarykeys[/blue] against those indexed as [purple]No Duplicates[/purple]. You may want to check existance first, as an error will be raised.

Appending to tables with [purple]AutoNumber[/purple] PK should not include the PK.

Calvin.gif
See Ya! . . . . . .
 
Thank you TheAceMan1! I will give that a whirl! Thank you so much for your response and helpful hints!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top