I have the following code:
Private Sub Command6_Click()
Dim curDatabase As Object
Dim rstSheet As Object
Dim hIDN As String
Set curDatabase = CurrentDb
Set rstSheet = curDatabase.OpenRecordset("tblSheet")
rstSheet.Movefirst
Set hIDN = rstSheet("FID").Value
msgbox(hIDN)
End Sub
then I got the error message: object required (hIDN). Did I miss anything?
Thanks in advance.
Private Sub Command6_Click()
Dim curDatabase As Object
Dim rstSheet As Object
Dim hIDN As String
Set curDatabase = CurrentDb
Set rstSheet = curDatabase.OpenRecordset("tblSheet")
rstSheet.Movefirst
Set hIDN = rstSheet("FID").Value
msgbox(hIDN)
End Sub
then I got the error message: object required (hIDN). Did I miss anything?
Thanks in advance.