Adrianna
Registered User.
- Local time
- Today, 16:27
- Joined
- Oct 16, 2000
- Messages
- 254
Obviously I have don't something wrong because I'm not getting the number to increment. Doesn't Order By sort in ascending order? If so, then why does this note work and why is the value not being passed back to the form?
PHP:
If IsNull(LocationID) Then
MsgBox "You must provide an Location ID", vbExclamation, "Missing Entry"
Else
If IsNull(Type) Then
MsgBox "You must provide an Node Type", vbExclamation, "Missing Entry"
Else
Set rst = dbITArchitectureData.OpenRecordset( _
"SELECT *" & _
" FROM tNeedLines" & _
" WHERE LocationID =" & Forms!FrmAddNeedlinesWithMapping!LocationID & " AND Type = '" & Forms!FrmAddNeedlinesWithMapping!Type & "'" & _
" ORDER BY mappingID", dbOpenDynaset)
If Type = "NON TRADOC Node" Then
mapId = 1
Else
mapId = 42
End If
With rst
Do While MappingID <> mapId
mapId = mapId + 1
Loop
MsgBox ("MapId is equal to " & [mapId]) ' looking at value
mapId = Forms!FrmAddNeedlinesWithMapping!MappingID
End With
rst.Close
End If
End If