If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Open form to a specific record
I have two forms that I am working with
One called Edit Equipment and a second called MC Equip List. The first form is a general view of a piece of heavy equipment which houses a subform displaying all the equipment attached to it (based off of MC Equip list) In the subform, I have it displaying it as follows... EQ Type --- Description --- Control Button EQ Type --- Description --- Control Button EQ Type --- Description --- Control Button For each piece of equipment that is attached to the machine. The hope was to click this button, open the MC Equip List form and jump to the record for a more detailed look at the attached equipment, and eventually order/repair/replace that item. I used the control button wizard and matched the two fields that were supposed to match, "[Eq Type]=" & "'" & [EType] & "'" however when I click this button a pop-up asks me to enter a parameter value. What am I doing wrong? |
#2
|
|||
|
|||
Open form to a specific record
"CJ-Hewitt" wrote in message
... I used the control button wizard and matched the two fields that were supposed to match, "[Eq Type]=" & "'" & [EType] & "'" however when I click this button a pop-up asks me to enter a parameter value. Place the follwoign code behind the buttion: docmd.Openform "MC Equip List form",,,"id = " & me!id Now, replace "id" with the name of the primary key field used for that sub-form table. It is possible that primary key field is EType, but are you sure? If yes, then go: docmd.Openform "MC Equip List form",,,"Etype = " & me!Etype If Etype is a string type field (text type), then you have to place quotes around the field like: docmd.Openform "MC Equip List form",,,"Etype = '" & me!Etype & "'" One more thing. if you allow editing in this sub-form, then you really should write any edits to disk BEFORE you launch the one details form. So, before the above openform command, go: if me.Dirty = true then me.Dirty = false end if -- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada |
#3
|
|||
|
|||
Open form to a specific record
I'll do that, thanks a bunch!
|
Thread Tools | |
Display Modes | |
|
|