penfold1992
Registered User.
- Local time
- Today, 08:43
- Joined
- Nov 22, 2012
- Messages
- 169
Code:
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Dim SQLstr As String
Set dbs = CurrentDb
Dim StatusInt As Integer
SQLstr = "SELECT [Status] FROM [Packages] WHERE [Packages].[Package]='" & _
Me.Workpackagecmb.Value & "'"
Set rs = dbs.OpenRecordset(SQLstr)
If IsNull(rs) Then
TrendValue = 0
Exit Function
End If
I created this about 1 hour ago but my laptop crashed and didnt save... now for some reason i cant figure out how to solve this meaningless problem...
So, I open a record set and rs is now loaded with the record I want,
how do I assign the value of "Status" as a vba variable. when I try
StatusInt = rs I get the "Type Mismatch" error...
its annoying because this is a simple answer, I know it is because i didnt have this problem before -.-