claytonjgordon
Technical User
I created a db with an access front end and three SQL back end tables. The users enter information into the access forms and its supposed to write to the SQL tables. On one form, this works perfectly: You hit a button on a menu form at it pulls up the data entry form as a new record.
Private Sub CreateAuditButton_Click()
On Error GoTo Err_CreateAuditButton_Click
As i said, that works perfectly; but when I try to do the same exact thing with another form I can't get it to work. It insists on pulling up all the records currently on that table and doesn't let you add a new record, even if you the record navigator tool (greyed out).
The code I'm using is the same:
and I check all the properties (details/Form) on both forms and everything is the same. Its as if the SQL table is write only (which I can't seem to verrify). I've also gone through all the properties on the SQL table sing SQL server Enterprise manager and the SQL tables seem to be set up exactly the same, too.
I'm not getting any error msgs indicating a possible error somewhere.
Does anyone have any ideas what could cuase this or how I could go about fixing it?
Dominus Nihil
(Master of Nothing)
Private Sub CreateAuditButton_Click()
On Error GoTo Err_CreateAuditButton_Click
Code:
Dim stDocName As String
Dim stLinkCriteria As String
DoCmd.OpenQuery ("ExceptionQueueQry2")
stDocName = "Mainform"
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd
DoCmd.Close (acForm), "Calendar"
Exit_CreateAuditButton_Click:
Exit Sub
Err_CreateAuditButton_Click:
MsgBox Err.Description
Resume Exit_CreateAuditButton_Click
End Sub
As i said, that works perfectly; but when I try to do the same exact thing with another form I can't get it to work. It insists on pulling up all the records currently on that table and doesn't let you add a new record, even if you the record navigator tool (greyed out).
The code I'm using is the same:
Code:
Private Sub Escalation_Button_Click()
On Error GoTo Err_Escalation_Button_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ExceptionForm1"
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd
DoCmd.Close acForm, "Mainform"
Exit_Escalation_Button_Click:
Exit Sub
Err_Escalation_Button_Click:
MsgBox Err.Description
Resume Exit_Escalation_Button_Click
End Sub
and I check all the properties (details/Form) on both forms and everything is the same. Its as if the SQL table is write only (which I can't seem to verrify). I've also gone through all the properties on the SQL table sing SQL server Enterprise manager and the SQL tables seem to be set up exactly the same, too.
I'm not getting any error msgs indicating a possible error somewhere.
Does anyone have any ideas what could cuase this or how I could go about fixing it?
Dominus Nihil
(Master of Nothing)