BigJimSlade
Registered User.
- Local time
- Today, 18:26
- Joined
- Oct 11, 2000
- Messages
- 173
Hello, Big Jim here:
I was hoping to use VB to run an sql statement and then place the single value returned by the sql statement in a label on a form. Here is the code I was using:
******
Dim rsta As Recordset
Dim strSQL As String
Dim strHold As String
strSQL = "Select [1] From [00Fleet] Where Base ='" & gstrBase & "' AND BoatType ='" & gstrHull & "';"
Set rsta = CurrentDb.OpenRecordset(strSQL)
strHold = rsta.[1]
lblJanFir.Caption = strHold
*****
The line "strHold = rsta.[1]" seems to be causing the problem here. Any ideas? Thanks in advance for your help.
Big Jim
I was hoping to use VB to run an sql statement and then place the single value returned by the sql statement in a label on a form. Here is the code I was using:
******
Dim rsta As Recordset
Dim strSQL As String
Dim strHold As String
strSQL = "Select [1] From [00Fleet] Where Base ='" & gstrBase & "' AND BoatType ='" & gstrHull & "';"
Set rsta = CurrentDb.OpenRecordset(strSQL)
strHold = rsta.[1]
lblJanFir.Caption = strHold
*****
The line "strHold = rsta.[1]" seems to be causing the problem here. Any ideas? Thanks in advance for your help.
Big Jim