G
Guest
Hello,
Before I start, here are my system specs.
WinXP sp2
MS Office 2003 Pro
Ms Office Access XP
Now, my problem. I created a db in officeXP. The form has 2 fields:
FileNameD_ID
Designation
The On_Open and Current events have the following items:
Me.AllowAdditions = False
Me.AllowEdits = False
On the form I have a Create Record button with the following code:
Private Sub cmdRecordCreate_Click()
On Error goto errHandle:
Me.AllowAdditions = True
DoCmd.GoToRecord, , acNewRec
errHandle:
Call CatchError
End Sub
When I click the button, I get this:
Error number 2105. You can't go to the specified record.
I double checked the tables and I can add records there. In the Open_Form
event I have this:
Private Sub Form_Open(Cancel As Integer)
DoCmd.MoveSize Width:=Me.Width, Height:=Me.FormHeader.Height +
Me.Detail.Height + Me.FormHeader.Height + 800
Me.cmdRecordSave.Enabled = False
Me.lblStatus.Caption = "<< READ-ONLY >>"
Me.lblStatus.ForeColor = 8421504
End Sub
That's all the code I have on the form. I thought this would work. What am I
missing.
Thank you in advance.
-me
Before I start, here are my system specs.
WinXP sp2
MS Office 2003 Pro
Ms Office Access XP
Now, my problem. I created a db in officeXP. The form has 2 fields:
FileNameD_ID
Designation
The On_Open and Current events have the following items:
Me.AllowAdditions = False
Me.AllowEdits = False
On the form I have a Create Record button with the following code:
Private Sub cmdRecordCreate_Click()
On Error goto errHandle:
Me.AllowAdditions = True
DoCmd.GoToRecord, , acNewRec
errHandle:
Call CatchError
End Sub
When I click the button, I get this:
Error number 2105. You can't go to the specified record.
I double checked the tables and I can add records there. In the Open_Form
event I have this:
Private Sub Form_Open(Cancel As Integer)
DoCmd.MoveSize Width:=Me.Width, Height:=Me.FormHeader.Height +
Me.Detail.Height + Me.FormHeader.Height + 800
Me.cmdRecordSave.Enabled = False
Me.lblStatus.Caption = "<< READ-ONLY >>"
Me.lblStatus.ForeColor = 8421504
End Sub
That's all the code I have on the form. I thought this would work. What am I
missing.
Thank you in advance.
-me