Book and Video Rental

  • Thread starter Thread starter Robbie Samuel
  • Start date Start date
R

Robbie Samuel

I am currently developing a system to loan books and
videos. I am confused with the forms development part of
this project. I would like to have a form that allows the
user to click a combo box and choose the title of the
book/video, and have the text boxes auto populate with the
information. I have done this using the unbound method
and it seems to work (the resource_id will appear) but not
the author, notes, etc. I need help to develop a form
that will allow users to pick a title to rent(combo box
from resource_table), a corresponding patron that is
renting (combo box from patron_table)and allow me to see
the relationship between patrons and resources in a query
(for overdue books).
I've been stuck on this for a few days now and would like
some professional help. Any help would be greatly
appreciated.

Robbie Samuel
 
I'm not sure, but I think this will help. There are other ways to do this
also.

1. Set up the combo box or list box that contains the list of books so it
contains ALL of the information that should be in the text boxes.

2. For the afterupdate event for the list, use VBA and use the code as
follows. I haven't tested this in MS Access.

[textbox1] =
  • .column(1)
    [textbox2] =
    • .column(2)

      You may be able to shorten it using a loop, but try that. If it doesn't
      work, my mistake.
 
The implementation of the last part, showing the
relationship between patrons and resources, depends on
your table structures. Please post additional detail on
the tables' structures, their relationships, and what
information you intend to store, if any, when using this
form.

Kevin S. (not related) has the right idea; remember though
that the Column property is zero-based, the first column
in the combo box is 0, the next 1, etc. Include each
column in the Row Source SQL of the combo box. (This is
generated automatically if you use the wizard.) If you
don't want a column to display in the drop-down list;
simply set its width to 0" in the Column Widths property.

HTH
Kevin Sprinkel
 
Remember:
In the combo box wizard the coumns are numbered 1, 2, 3 etc
In the column(1) property used below they are 0, 1, 2, etc

Kevin S. said:
I'm not sure, but I think this will help. There are other ways to do this
also.

1. Set up the combo box or list box that contains the list of books so it
contains ALL of the information that should be in the text boxes.

2. For the afterupdate event for the list, use VBA and use the code as
follows. I haven't tested this in MS Access.

[textbox1] =
  • .column(1)
    [textbox2] =
    • .column(2)

      You may be able to shorten it using a loop, but try that. If it doesn't
      work, my mistake.

      -----------------


      Robbie Samuel said:
      I am currently developing a system to loan books and
      videos. I am confused with the forms development part of
      this project. I would like to have a form that allows the
      user to click a combo box and choose the title of the
      book/video, and have the text boxes auto populate with the
      information. I have done this using the unbound method
      and it seems to work (the resource_id will appear) but not
      the author, notes, etc. I need help to develop a form
      that will allow users to pick a title to rent(combo box
      from resource_table), a corresponding patron that is
      renting (combo box from patron_table)and allow me to see
      the relationship between patrons and resources in a query
      (for overdue books).
      I've been stuck on this for a few days now and would like
      some professional help. Any help would be greatly
      appreciated.

      Robbie Samuel
 
Back
Top