Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Posts
    1

    Unanswered: set the on_loan field in the DVD table to true (was "Hire System Help")

    I have two tables, one named Loan and one named DVD Details.

    On my DVD details table i have a field name, on_loan with a data type yes/no.

    I have created a form called LoanForm where i want to select a DVD with a combo box,

    then select a Set loan button that will set the corresponding DVD on_loan field to yes(true), in the dvd form.

    on the button i have the following code


    Private Sub HireDVDButton_Click()

    Update dvd
    Set car.on_loan = True



    End Sub


    But it doesn't seem to set the on_loan field in the DVD table to true, which is what i want to do.

    Sorry if it's not clear what i want to do. I am just a beginner.

    Thanks in advance

  2. #2
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372

    Hello Access85!

    Look at "DemoYesNoFieldA2000.mdb". Open Form1 and try.
    Attached Files Attached Files

  3. #3
    Join Date
    Nov 2004
    Location
    Harrogate, N.Yorks, UK
    Posts
    83
    Wouldn't it be a better idea to have a LoanStartDate and LoanEndDate in the Loan table? A query to look at Loans with a LoanStartDate and no LoanEndDate tells you what is on loan. This also enables calculations for length of loan, overdue loans, most popular rental days etc...

Posting Permissions

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