Link to home
Start Free TrialLog in
Avatar of Michael Ols
Michael Ols

asked on

Append query not pulling data from table.

The idea is from a Form a combo box is selected and the button is pressed once the selection is complete. when the button is pressed an Append Query is ran and appends to a table using the value that was just selected in the combo box along with a date and time stamp.

 Here is the Coder for the Button
Private Sub SubmitEvent_Click()

DoCmd.OpenQuery "Event"
DoCmd.SetWarnings False

End Sub

Open in new window



The SQL for the Append Query is


INSERT INTO TroubleTicket ( TroubleCallBody, DateReported, TimeReported )
VALUES ('Set hero condition ' & [Hero].HeroCon, date(), now());

Open in new window


where Hero is the table and HeroCon is the field the combo box is stored it. I thought of pulling the value direct from the combo box but wasn't able to get it to work.

when I run the query it prompts me for user input with a message box. I'm not sure what I am doing wrong.
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial