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
The SQL for the Append Query is
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.
Here is the Coder for the Button
Private Sub SubmitEvent_Click()
DoCmd.OpenQuery "Event"
DoCmd.SetWarnings False
End Sub
The SQL for the Append Query is
INSERT INTO TroubleTicket ( TroubleCallBody, DateReported, TimeReported )
VALUES ('Set hero condition ' & [Hero].HeroCon, date(), now());
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.