Linking from form query results

philtr

Registered User.
Local time
Today, 07:33
Joined
Mar 19, 2008
Messages
11
Hi guys, I have a query embedded into a form called 'approved work orders', the results from the query are non editable in the form but i'd like the user to be able to click each record and open up my 'work orders' form where I can then edit the data. Any ideas? Is this even possible? Thanks.
 
see if you can apply this method to your file...
 
Last edited:
Thats exactly what i'm after although i've had no luck getting it to work, i've tried the following code on the on click function for the field (ProjectID) I want it to link from

Code:
Private Sub ProjectID_Click(Cancel As Integer)

  DoCmd.OpenForm "Work Orders", acNormal, , "ProjectID = " & ProjectID

End Sub

Any ideas why it won't work?
 
have you tried all of these:
Code:
DoCmd.OpenForm "Work Orders", acNormal, , "[ProjectID] = " & me.ProjectID
Code:
DoCmd.OpenForm "Work Orders", acNormal, , "ProjectID = " & me.ProjectID
Code:
DoCmd.OpenForm "Work Orders", acNormal, , "ProjectID = " & me!ProjectID
Code:
DoCmd.OpenForm "Work Orders", acNormal, , "ProjectID = " & forms!yourform!ProjectID
Also, if ProjectID is a text data type, it needs to be enclosed in the quotation marks, not outside of it.

Why won't it work? Do you get a message? What does it say? What happens?
 
Solved it! Many thanks for you help ajetrumpet, works perfectly :D
 

Users who are viewing this thread

Back
Top Bottom