R
RDunlap
I have a data entry form that worked, but I changed the backend to linked SQL
tables and now I get an error: Property Not Found when I try to create a new
record. I can edit existing records with the form just fine.
Here is what happens:
I have a combo box that the user selects an experiment that they want to
work with. Once they make a selection, the are presented with about 30
fields to populate and then they can press a button to save the record. When
they enter data into a field and then try to go to another field, an error
saying "Property Not Found" pops up. Below is the code that gets exeucted
when they make a selection in the combo box:
Private Sub ComboPenRepRoomExp_Click()
Dim strSQL As String
Set rstHarvest = New ADODB.Recordset
rstHarvest.CursorLocation = adUseClient
strSQL = "Select * from PenHarvest where PenKey = " &
ComboPenRepRoomExp.Value
rstHarvest.Open strSQL, CurrentProject.Connection, adOpenDynamic,
adLockOptimistic
If rstHarvest.EOF And rstHarvest.BOF Then
rstHarvest.AddNew
cmdNext.Enabled = False
cmdPrev.Enabled = False
End If
Set Me.Recordset = rstHarvest
UnlockPenHarvestDetailTextBoxes
LotTattooNo.SetFocus
End Sub
UnlockPenHarvestDetail is just a routine that loops through all the text
boxes on the screen and enables them for data entry.
This used to work fine when using Access tables, but now I get the weird
Property Not Found error message when it is a linked SQL table.
I don't know what other info to post. There is no code on the fields for
validation, no events such as BeforeUpdate or AfterUpdate or anything like
that on any of the fields.
Can anyone give me an inkling of what might be the issue?
TIA for any help.
tables and now I get an error: Property Not Found when I try to create a new
record. I can edit existing records with the form just fine.
Here is what happens:
I have a combo box that the user selects an experiment that they want to
work with. Once they make a selection, the are presented with about 30
fields to populate and then they can press a button to save the record. When
they enter data into a field and then try to go to another field, an error
saying "Property Not Found" pops up. Below is the code that gets exeucted
when they make a selection in the combo box:
Private Sub ComboPenRepRoomExp_Click()
Dim strSQL As String
Set rstHarvest = New ADODB.Recordset
rstHarvest.CursorLocation = adUseClient
strSQL = "Select * from PenHarvest where PenKey = " &
ComboPenRepRoomExp.Value
rstHarvest.Open strSQL, CurrentProject.Connection, adOpenDynamic,
adLockOptimistic
If rstHarvest.EOF And rstHarvest.BOF Then
rstHarvest.AddNew
cmdNext.Enabled = False
cmdPrev.Enabled = False
End If
Set Me.Recordset = rstHarvest
UnlockPenHarvestDetailTextBoxes
LotTattooNo.SetFocus
End Sub
UnlockPenHarvestDetail is just a routine that loops through all the text
boxes on the screen and enables them for data entry.
This used to work fine when using Access tables, but now I get the weird
Property Not Found error message when it is a linked SQL table.
I don't know what other info to post. There is no code on the fields for
validation, no events such as BeforeUpdate or AfterUpdate or anything like
that on any of the fields.
Can anyone give me an inkling of what might be the issue?
TIA for any help.