Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date References (2000)

    Morning Loungers

    The contract I
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Date References (2000)

    Strictly speaking, you don't need a PeriodID field in tblOrder, since it is derived information. You can calculate the period in a query as follows:

    DLookUp("PeriodID","TblPeriod","StartDate<=# " & Format(Nz([UpliftDate],#9/9/9999#),"mm/dd/yyyy") & "# And EndDate>=#" & Format(Nz([UpliftDate],#9/9/9999#),"mm/dd/yyyy") & "#")

  3. #3
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date References (2000)

    Thank you Hans

    I had to change the PeriodID to PeriodRef to Display the period ref but it works perfectly, as always!

    I've put a search form back in that I deleted to get the thing under 100Kb, which is a copy of the search form from the last database I put together.

    On this form, if the first site listed (F1631) in the Select Site Combo Box is selected, the orders for that site are listed. OK so far. A double click on an entry in the list box displays the details for that order. (Period Number proudly included!)

    The second site also works (F1632) But whilst the third site (F1563) displays the orders for that site in the list box a double click fires up an empty form instead of displaying the order details.

    I can find no reason for this. Any offers?

    Regards

    Graeme
    Attached Files Attached Files

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Date References (2000)

    Your code imposes the wrong filter. You should use SiteID instead of OrderID:

    DoCmd.OpenForm FormName:="FrmExistingOrder", WhereCondition:="[SiteID]=" & Me.LisDocDetails

  5. #5
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date References (2000)

    Thanks

    Graeme

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •