Search results

  1. M

    Solved Pull string from table instead of ID

    I think that I understand much of what you are saying, however perhaps I did not explain the tables well. TblReservations does have a field that contains the reservation source. This is the filed ReservationSource on tblReservations. Unfortunatelly the data saved in it is the ID value of the...
  2. M

    Solved Pull string from table instead of ID

    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...
  3. M

    Open continuous subform based on today's date

    Could you please clarify something for me? The main form where this subform is placed in is loaded when the database is opened and then the data in the subform is updated by changing the value of a combobox in the main form using the following code: DoCmd.SearchForRecord , "", acFirst...
  4. M

    Solved Greyed out checkbox on report

    Many thanks!
  5. M

    Solved Refresh listbox on another form

    Thanks. I'll check the examples and save this for future reference.
  6. M

    Solved Refresh listbox on another form

    Many, many thanks.
  7. M

    Open continuous subform based on today's date

    Yes, I'd like the date before if there is no match. You are correct in that it there is no previous reservation it wouldn't find anything. If there is no previous date, then do nothing. But as I was mentioned above, I realize that this is going to be harder than I thought as it is not something...
  8. M

    Open continuous subform based on today's date

    I do see that with this code it is also necessary to specify the property as the code is looking at the table.
  9. M

    Open continuous subform based on today's date

    Sure, the 15th is closest, but the 12th is the closest date before the current day in the example.
  10. M

    Open continuous subform based on today's date

    There is never a record with the same date as this subform is filtered to show records for one single property and only one reservation can begin on a specific date.
  11. M

    Open continuous subform based on today's date

    My apologies. At the time I was not sure what was more practical and I guess that on my last post I thought that I was simplifying the goal. If I can understand how to do one thing, then I'll understand how to do the other if I need to.
  12. M

    Open continuous subform based on today's date

    I am not sure that this does what I need. Let me explain with a table. Imagine that I have reservations with the following dates: 1st 1/1/23 2nd 2/3/23 3rd 7/4/23 4th 12/4/23 5th 15/4/23 -Now, imagine that today's date is 7/4/23. In that case, the idea is to select the record that...
  13. M

    Open continuous subform based on today's date

    Thank you, but what if there is no record with a checkindate = date()? In that case, can I make it select the one with the closest date, ahead or behind?
  14. M

    Open continuous subform based on today's date

    I have a form (frmMain) with a continuous subform (frmReservations) that contains reservations with dates (CheckInDate) both past and future. FrmReservations (the subform) is sorted by date (which is needed), but when it is loaded, it always selectec and displays the reservation with the...
  15. M

    Solved Refresh listbox on another form

    I see. That seems to do it, but why? It is becasue the code stops until the other form closes? Why would a requery from the pop up form on close not have the same effect?
  16. M

    Solved Refresh listbox on another form

    Here it is. It is very barebones, so it will give you a lot of errors when loading becasue of deleted subforms and tables. To reproduce the issue, open the db, click on the textbox under "Guest Search", enter the word "Guest" and then click on "Find Guest". This will load the list. Then...
  17. M

    Solved Refresh listbox on another form

    Ok, I am not sure if I understand: Dim WithEvents MyForm As Form 'This is in the form that the pop up originates from, which is frmFindGuest Private Sub SearchResults_DblClick(Cancel As Integer) 'This is the listbox DoCmd.OpenForm "frmReservationEdit", , , "ID = " & Me.ID 'I am now...
  18. M

    Solved Refresh listbox on another form

    Hi Minty. This still does not do it. Just as before, I need to close the form where the list is in and reload it for the changes to appear. Are there any form settings that could preveind the requerry to happen?
  19. M

    Solved Refresh listbox on another form

    Thanks, but this still does not do it. When the pop up form is closed, the listbox on the original form does not update to show the new data.
  20. M

    Solved Refresh listbox on another form

    Private Sub SearchResults_DblClick(Cancel As Integer) Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmReservationEdit" stLinkCriteria = "[ID]=" & Me![SearchResults] DoCmd.OpenForm stDocName, , , stLinkCriteria End Sub
Back
Top Bottom