J
Joe
I feel like this one is simple enough, but it's had me stumped for quite a
while. I have a string expression that will be used as an SQL statement.
The string is built by looking through a record in a table and adding
whatever text is available for each field. Here is the jist of what I need:
Dim rstSub As Recordset
Dim db As Database
Dim strAdd As String
Dim x As Integer
Set db = CurrentDb
Set rstSub = db.OpenRecordset("tblSubDef", dbOpenDynaset)
'Some of this is in plain text
With rstSub
Do While !ThisColumn <> ""
strAdd = !ThisColumn
strWhere = strWhere & "Subject = " & strAdd & " "
strWhere = strWhere & "AND "
.MoveNextColumn
End With
Your help will be much appreciated!
Joe
while. I have a string expression that will be used as an SQL statement.
The string is built by looking through a record in a table and adding
whatever text is available for each field. Here is the jist of what I need:
Dim rstSub As Recordset
Dim db As Database
Dim strAdd As String
Dim x As Integer
Set db = CurrentDb
Set rstSub = db.OpenRecordset("tblSubDef", dbOpenDynaset)
'Some of this is in plain text
With rstSub
Do While !ThisColumn <> ""
strAdd = !ThisColumn
strWhere = strWhere & "Subject = " & strAdd & " "
strWhere = strWhere & "AND "
.MoveNextColumn
End With
Your help will be much appreciated!
Joe