Thank you in advance for your help.
When I run the following I get a "Run-Time Error 91: Object variable or With block variable not set"
It is having a hang up on this line "hypAddress = tblStation("A1" )"
If I set "hypAddress " of course I get a "Type Mismatch"
What am I doing wrong?
When I run the following I get a "Run-Time Error 91: Object variable or With block variable not set"
Code:
Function GetAddress() As Hyperlink
Dim dbLogBook As DAO.Database
Dim tblStation As DAO.Recordset
Dim strSQL As String
Dim hypAddress As Hyperlink
Set dbLogBook = CurrentDb
strSQL = "SELECT A1 FROM tblStation"
Set tblStation = dbLogBook.OpenRecordset(strSQL)
hypAddress = tblStation("A1")
tblStation.Close
GetAddress = hypAddress
End Function
It is having a hang up on this line "hypAddress = tblStation("A1" )"
If I set "hypAddress " of course I get a "Type Mismatch"
What am I doing wrong?
Comment