Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unbound form/dblclick maybe?

Status
Not open for further replies.

montrose

Technical User
Jun 18, 2001
172
US
Seeking your wonderful advice again after searching through the Forums and Access Help....

I have an unbound form with 2 subforms embedded on it. The first embedded form [frmEquipAvail] shows some rental equipment that is "available". I then have a command button for the user to click on to open up a form for them to place a particular record from the "available" form onto another form [frmEquipHold]. The user was to fill in the form by typing in the id number of the particular equipment record, indicate for whom the equipment is being held (selected from a combobox), and the date it's being placed on hold (defaults to today's date).

The first user who tried this higlighted the record that she wanted to hold in frmEquipAvail, then clicked the command button to open up frmEquipHold. She selected her customer from the combo box, and closed the Hold Form. She thought that by using the record selector in frmEquipAvail, the id number would automatically be entered into the frmEquipHold.

Well that didn't happen, although it would be great if it did! I am VERY vba challenged, so I'm asking if someone can walk me through getting this accomplished.

When the user uses the record selectors to pick out a piece of equipment from the frmEquipAvail, and then clicks on the frmEquipHold command button, that equipment record id should default to/automatically become the equipment id of the frmEquipHold. I think I need an event procedure triggered by the user double-clicking on the record selector. I think it will then insert the equipment id from the record selected into the frmEquipHold once the command button is clicked. Can anyone help me translate that into the appropriate code? With great respect for you time and knoweldge, thanks.

 
Your problem, if I'm understanding you correctly, is easier than you think. Just go into the properties of the text box you want to fill and set the default.

Default value =[Forms]![frmEquipAvail]![id_number]

That will take the select id_number from the main form and put it in the subform. Do the same thing for any areas you want to fill that way.
 
Thanks for responding, JJohns. That would be easy, indeed, if I was using a bound form. However, for a variety of reasons, I'm using an unbound form. The unbound from then has the frmEquipAvail on it (I think I used the correct term in my original post, 'embedded'). This datsheet form just allows the user to see what equipment is available for rental. Once they see what equipment is available in the form, they may then want to place a piece of equipment on hold. To do that, I put a command button on the unbound form. The command button opens up the frmEquipHold. What I want to happen is that if the user uses the record selector in frmEquipAvail and double-clicks on the record indicating the equipment they want to place on hold, then when they double-click, the frmEuipHold opens and the equipment id number they selected in frmEquipAvail is inserted/set to value/from that particular record's equipment id number INTO the now opened frmEquipHold. I'm convinced I have a vba dyslexia, but with some help I know I can figure this out. Maybe I need to re-design this form and use hidden frms- Will keep trying things in the meantime. Again, thanks for you input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top