Keith
Registered User.
- Local time
- Today, 15:28
- Joined
- May 21, 2000
- Messages
- 129
I am trying to populate a multi select list with options available depending on room type. I can get either the Package or Rate on the list but not both, this indicates my strSQL is ok.
I have spent all day on this forum and the web but still have not succeeded so here I am, cap in hand, asking you wonderful people for help.
I have spent all day on this forum and the web but still have not succeeded so here I am, cap in hand, asking you wonderful people for help.
Code:
Select Case Frame71()
Case 1 'Single Room Selected
Me.ctrListPackage.RowSource = ""
Me.ctrListPackage.ColumnCount = 2
y = "S"
strSQL = "SELECT tblTariff.TariffRate, tblTariff.TariffPackage FROM tblTariff WHERE (((tblTariff.TariffRoomType)=" & Chr(34) & y & Chr(34) & "))"
Set rs = CurrentDb.OpenRecordset(strSQL)
With rs
If Not .BOF And Not .EOF Then
.MoveLast
.MoveFirst
While (Not .EOF)
Me.ctrListPackage.AddItem (rs.Fields("TariffPackage"))
'Me.ctrListPackage.AddItem rst!TariffPackage & ";" & rst!TariffRate
.MoveNext
Wend
End If
End With
Me.txtRoomType.Value = y
Me.txtRoom.Value = DMax("RoomNumber", "tblRooms") + 1
Me.txtOcc.Value = 1