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

button not work

Status
Not open for further replies.

wdu94

Programmer
Aug 15, 2001
61
US
Hello,

I want to add New info. and close the form but I got error:"you can't goto specical record" when I click the button. And also, the form not close yet.

Thank you for your help.

Jeannia

Here are my codes:

Private Sub Command11_Click()
On Error GoTo Err_Command11_Click
If PassWord.Value = Text8.Value Then
DoCmd.GoToRecord , , acNewRec
DoCmd.Close acForm, "sbfrmNewMember"
GoTo Exit_Command11_Click
Else
MsgBox "Verify PassWord not match, Please try again."
GoTo Exit_Command11_Click

End If


Exit_Command11_Click:
Exit Sub

Err_Command11_Click:
MsgBox Err.Description
Resume Exit_Command11_Click

End Sub
 
Does the form allow new records?

A couple of reasons the form may not allow new records...

1. The Form's "Allow Additions" property may be set to No. Check the design view of the form under the Data tab of the properties window.

2. The query that feeds the form may not be updateable. This could be due to the type of relationsships, if any exist.

Looking at your navigation buttons, see if the last little button with the arrow pointing to the right and star is "grayed" out or disabled. This would indicate if you are even allowed to add new records to this form.

Just a thought...


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top