Open record in subform from hyperlink click on 2nd subform?

hbrehmer

Member
Local time
Yesterday, 23:25
Joined
Jan 10, 2020
Messages
78
Hi all,
It's a Monday and not enough coffee yet. I can't seem to figure this one out. It's probably very simple.

I have a main form with 3 subforms. Only one is an entry point, but another subform displays those entries as they are being entered. I want the user to be able to click on the list of entries to edit if necessary. I created a hyperlink on the field in the List subform. I have the code the open the form, but instead of just populating the record in the Entry form, it opens a new tab.

How can I get the OpenForm to just populate the subform instead of opening a whole new form?
 
Hi. You won't use OpenForm on subforms. Instead, you would typically navigate the main form or subform to the desired record.
 
Hi. You won't use OpenForm on subforms. Instead, you would typically navigate the main form or subform to the desired record.
I figured, but what is the code? OpenRecord? I haven't used that one before, that is why I'm having an issue with this one.
 
I figured, but what is the code? OpenRecord? I haven't used that one before, that is why I'm having an issue with this one.
Hi. To get an idea what the code looks like, try adding a Combobox using the Wizard and select the third option.
 
Ok. I need help. Here is what I have:

Private Sub TicketID_Click()
DoCmd.SearchForRecord , "subTktSchedule2", acFirst, "TicketID= " & Me.TicketID
End Sub

My TicketID is in subOpenOrders form and I want to open the record in subTktSchedule form. Both are sub forms on frmScheduleTicket. What am I missing?
 
Ok. I need help. Here is what I have:

Private Sub TicketID_Click()
DoCmd.SearchForRecord , "subTktSchedule2", acFirst, "TicketID= " & Me.TicketID
End Sub

My TicketID is in subOpenOrders form and I want to open the record in subTktSchedule form. Both are sub forms on frmScheduleTicket. What am I missing?
Hi. Are you able to post a sample copy of your db with test data?
 

Users who are viewing this thread

Back
Top Bottom