adding multiple items to a subform

F

funguy_007

I am using access 2003. I am attempting to setup an inventory
database for equipment that we loan out to various clients. I have
followed the Northwinds Example and everything seems to work well when
using it. Now I am trying to customize the use.

My main form is called frmLoan and is populated by a query.

I have a subform on that form that is related to a table
(tblLoanDetails).
LoanID
EquipmentID
Equipment Value

These two are joined by using LoanID in the master and child link
fields.

I have a command button on the main form and when clicked it opens a
form called frmEquipmentSearch. This form is based on an application
I borrowed from Allan Browne's website. (find as you type). This form
gets it information from tblEquipment. When you double click on the
item in the frmEquipment, I want it to add it to the subform (as this
is the item the person is signing out.)

I have been able to get it to add the record to the tblLoan Details
but it will not display in the subform.

code used on double click event:

Private Sub EquipmentName_DblClick(Cancel As Integer)

Forms!frmLoan!frmLoanSubForm!EquipmentID = Me!EquipmentID

Forms!frmLoan.SetFocus
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Forms!frmEquipmentSearch.SetFocus


End Sub

I want the subform to display the items as I need to check and make
sure I didn't miss anything. Any help would be greatly appreciated.
 
G

Guest

007, I have done the same except with using a listbox and a submit button. I
found I needed to requery the subform.

Me.subformName.requery

Hope this helps out.
.... John
 
F

funguy_007

007, I have done the same except with using a listbox and a submit button. I
found I needed to requery the subform.

Me.subformName.requery

Hope this helps out.
... John

John thanks for your help.

I tried to requery the subform and it doesn't seem to make a
difference. Where did you place the requery to make it work for your
situation?

I have tried putting it in afterupdate on both the form and subform.
I tried setting the focus to the subform and then requerying. I am
starting to think there is another problem why it is not showing.

derek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top