S
Seeker
I'm going blind trying to find the "type Mismatch" in this code - could
someone please help??
If IsNull([PVNO]) Then
MsgBox "Please enter the Provider Number # before proceeding."
Exit Sub
Else
'Check to see if a record already exists
Set dbcurrent = CurrentDb
Set rstemp = CurrentDb.OpenRecordset("select * from [t_Prov] where
[PV_NUMBER] = " & "'" & Me.[PVNO] & "'" & ";")
stDocName = "f_Prov"
If rstemp.RecordCount > 0 Then 'Open Record
stLinkCriteria = "[PV_NUMBER]=" & "'" & Me.[PVNO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else 'Create a new record
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms!f_Prov.DataEntry = True
End If
Forms!f_Prov.PV_Number = Me.PVNO
End If
someone please help??
If IsNull([PVNO]) Then
MsgBox "Please enter the Provider Number # before proceeding."
Exit Sub
Else
'Check to see if a record already exists
Set dbcurrent = CurrentDb
Set rstemp = CurrentDb.OpenRecordset("select * from [t_Prov] where
[PV_NUMBER] = " & "'" & Me.[PVNO] & "'" & ";")
stDocName = "f_Prov"
If rstemp.RecordCount > 0 Then 'Open Record
stLinkCriteria = "[PV_NUMBER]=" & "'" & Me.[PVNO] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else 'Create a new record
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms!f_Prov.DataEntry = True
End If
Forms!f_Prov.PV_Number = Me.PVNO
End If