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

Add record button not working

Status
Not open for further replies.

lbrown13

MIS
Oct 17, 2002
39
US
I have created a form from several tables. I have also added an add record button, but when I click it, I get this "you can't go to specified record".

here is the code (using Access 2000)

Private Sub Command40_Click()
On Error GoTo Err_Command40_Click


DoCmd.GoToRecord , , acNewRec

Exit_Command40_Click:
Exit Sub

Err_Command40_Click:
MsgBox Err.Description
Resume Exit_Command40_Click

End Sub

Any help would be appreciated!
 
If the form is based on several tables I am assuming that the record source is a query or SQL statement. The problem may be that this is not an updatable query.



Hope this helps.

OnTheFly
 
I have experimented with the adding of records on multi-table queries and have not been successful as it seems like they do become update only. Usually I add a subform to the main form based off of one table for each table - that way I can always add/change/delete. Sometimes this means I have one main form with multiple subforms that each have multiple subforms on them. Tab controls become very useful when doing this type of structure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top