I'm having the db put together a string to base a recordset off of, and depending on the ID number, the select statement changes.
Basically it looks like this:
Expand|Select|Wrap|Line Numbers
- If Me.ProjectID.Value <=1835 Then
- str = _Select statement 1
- ElseIf 1836 <= Me.ProjectID.Value <= 5109 Then
- str = _Select statement 2
- Else
- str = _Select statement 3
- End if
- Set DB = CurrentDB
- Set rst = DB.OpenRecordSet(str)
Am I doing something wrong in this statement?