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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access Forms: navigating between forms

Status
Not open for further replies.

InspectorHound

Programmer
Nov 21, 2014
48
US
I am creating an MS Access 2013 desktop application and need some help. I have created a continuous form that is based on a query that has five fields. The five fields are displayed in the detail section in tabular style. The header of the form has three unbound textboxes, related to three of the five query fields where users can search the query. When the user types in a name or SSN and hits search, the records related to that person are displayed in the detail section.

I now need to select one of those records in the detail section and have information from another table displayed. What is the best way of doing this. Should I open a new form?
 
Ok, I created a hyper link field and am using its on Click property, but nothing is happening. Here is my code:

Public Sub AuthLinkedProfileID_Click()

MsgBox " Hello "

If Not IsNull([AuthLinkedProfileID]) Then

DoCmd.OpenForm "frmVouchers", acNormal, , "Forms![frmVouchers]![LinkedProfileID] Like ""*" & [AuthLinkedProfileID] & "*"" ", acFormReadOnly, acWindowNormal

End If

MsgBox " Hello "
End Sub
 
your where condition does not make any sense. Should be something like
"someFieldInOpeningForm = " & someValueOnCurrentForm

LinkedProfileID = " & [AuthLinkedProfileID]
or if text
"LinkedProfileID = '" & [AuthLinkedProfileID]& "'
 
Ok, I tried that. Thanks. The problem now is that when I click on the hyperlink in the textbox, the code does not run.
 
If Msgbox "hello" does not appear then you need to verify that you have [event Procedure] selected in the onclick property of the control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top