View Full Version : Buttons That Jump To Linked Form Bringing Record Data With It, Look Up!


jblackman
02-27-2001, 11:13 AM
Wondered if you could help me. I have a software info form that displays software record info and has a drop down box for MFG that links to the MFG table. On the left of the drop down, I have a button that currently jumps to a blank record on the MFG form(Showing more detailed info for that Mfg). I would like it to jump to the MFG form and bring up the record that currently shows in the software form. For Example: If MS Office is the software record showing "Microsoft" as the MFG, I would like the "Microsoft" MFG record to show up in the MFG form when the jump button is clicked.... Thanks in advance for your help?

Currently, this is the code that is shown when you click on that button...

-----------
Private Sub Command108_Click()
On Error GoTo Err_Command108_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmMfg"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command108_Click:
Exit Sub

Err_Command108_Click:
MsgBox Err.Description
Resume Exit_Command108_Click

End Sub
-----------

llkhoutx
02-27-2001, 01:35 PM
Use a subform for the software, linked by the Manuf. When you select a new Manuf, you'll automatically see all software.

jblackman
02-28-2001, 09:18 AM
Thanks, I ended up using the wizard to look up specific data and it filtered it for me... My problem was that I was telling the form to open to a new record so it was filtering on two records, showing the blank one... Once this logic was removed, it worked great... stupid, I know... but hey.. I appreciate the help.