G
Guest
I need to record the next output file index number to a table. This table is
called "tlkpStoredStrings". It has three columns: "VariableName",
StoredText", "Description". I want to write this index number to the record
whose name is "File Number". Every way I try, I get an error: "Type
Mismatch". Here is what I wrote:
Public Sub SaveNextFileNumber(strFileNumber As String)
Dim dbs As Database
Dim rst As Recordset
If strFileNumber = "99" Then strFileNumber = "00"
strFileNumber = strFileNumber + 1
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("tlkpStoredStrings")
[Here I need a way to move to the record in which "VariableName" =
"FileNumber"
With rst
.Edit
!StoredText = Format$(strFileNumber, "00")
.Update
.Close
End With
Set dbs = Nothing: Set rst = Nothing
End Sub
I would appreciate help with this...
called "tlkpStoredStrings". It has three columns: "VariableName",
StoredText", "Description". I want to write this index number to the record
whose name is "File Number". Every way I try, I get an error: "Type
Mismatch". Here is what I wrote:
Public Sub SaveNextFileNumber(strFileNumber As String)
Dim dbs As Database
Dim rst As Recordset
If strFileNumber = "99" Then strFileNumber = "00"
strFileNumber = strFileNumber + 1
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("tlkpStoredStrings")
[Here I need a way to move to the record in which "VariableName" =
"FileNumber"
With rst
.Edit
!StoredText = Format$(strFileNumber, "00")
.Update
.Close
End With
Set dbs = Nothing: Set rst = Nothing
End Sub
I would appreciate help with this...