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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run time error on a form

Status
Not open for further replies.

coyote1x

Technical User
Dec 10, 2004
7
US
All I have created an edit records query and an edit anwser query so people can edit answers to various questions once they have been entered. I have created 2 forms and the associate opens the Edit Answer form by clicking on a command button. This works great. However when they changes they select the question ID from the drop down menu they receive the error of no current record. Here is the SQL on the Answer Query and the VBA code for the form. Any help would be great.

SQL:
SELECT [Answers Table].Answer, [Answers Table].Observation, [Answers Table].RecordId, [Answers Table].Qid, [Question Table].[Question Number], [Question Table].[Question Title], [Question Table].[Question Text], [Question Table].[Has NA]
FROM [Question Table] INNER JOIN ([IQ 2] INNER JOIN [Answers Table] ON [IQ 2].RecordId = [Answers Table].RecordId) ON [Question Table].Qid = [Answers Table].Qid
WHERE ((([Answers Table].RecordId)=[Forms]![Edit Records]![RecordId]) AND (([Answers Table].Qid)=[Forms]![EditAnswer1]![Qid]));

The VBA is an On Change Event Procedure for the QID field

Private Sub Qid_Change()
[Forms]![EditAnswer1].Requery


End Sub
 
I would assume table wasn't refreshed yet. So After Update RefreshTable and see what is going to happen. Just a guess.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top