On a form I have a combobox pulling its values from a table (tblResOrigin). The table has two fields (ID and ResOrigin) and on the combobox the bound column is the first one (ID, a number) but it is not visible and the visible text is the second column (ResOrigin, a string). This is the rowsource for the combobox:
The value selected here is stored in the table tblReservations, as ReservationSource, along with other info.
I am now running into an issue on a query that fills a listbox because when I try to pull the value of "ReservationsSource" from tblReservations, I naturally get a number, which is what is stored in tblReservations.ReservationSource, but what I need is the string in tblResOrigin that corresponds to that numbe. Can that be done?
This is the query:
Please, note that there is no relationship between those two tables
Code:
SELECT [tblResOrigin].[ID], [tblResOrigin].[ResOrigin] FROM tblResOrigin;
I am now running into an issue on a query that fills a listbox because when I try to pull the value of "ReservationsSource" from tblReservations, I naturally get a number, which is what is stored in tblReservations.ReservationSource, but what I need is the string in tblResOrigin that corresponds to that numbe. Can that be done?
This is the query:
Code:
SELECT tblReservations.ID, tblReservations.PropertyName, tblReservations.GuestName, tblReservations.CheckInDate, tblReservations.CheckOutDate, tblReservations.ReservationDate, tblReservations.Status, tblReservations.ReservationSource
FROM tblReservations, tblResOrigin
WHERE (((tblReservations.GuestName) Like "*" & [forms]![frmPropertyHistory]![txtFindGuest] & "*"))
ORDER BY tblReservations.CheckInDate;