Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 301
  • Last Modified:

hyperlink subaddress to specific record

I have a search form in my MS 2K database that retrieves records with selected minimal data in datasheet view. I have added an identifier column that mirrors the primary key field and have made it a hyperlink.(I'm doing this since my primary key is an autonumber field) I would like for the users to be able to click one of the returned records in datasheet view with a hyperlink and go to the applicable record on the form which contains all data.

Currently, I can get to the form by clicking on the hyperlink but it will not go to the specified record. i.e. retrieved data might be primary key field of 37 & identifier field of 37 with name, organization etc. I can click on the 37 in the identifier field and it will take me to the form but it will be on record #1.My hyperlink looks like this 37##Form frmLLDataView
0
howcheat
Asked:
howcheat
  • 3
  • 2
1 Solution
 
shanesuebsahakarnCommented:
I wouldn't do this with hyperlinks - I don't know if you can pass filter strings this way.

Instead, just put some code like this in the OnClick or OnDoubleClick event (preferable) of the form:
DoCmd.OpenForm "frmLLDataView",,,"[ID]=" & Me!txtID

Just replace ID with your ID field and txtID with the control which holds this value.

You could also simulate the hyperlink by putting the above in the OnClick event of the text box which holds your current hyperlink.
0
 
howcheatAuthor Commented:
Interim reply: I will be reviewing replies and addressing this issue within 48 hours.
0
 
howcheatAuthor Commented:
YEEESSSSS!! It works!!
0
 
shanesuebsahakarnCommented:
Great, glad I could help!
0
 
shanesuebsahakarnCommented:
Don't forget to accept and grade my answer ;)
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now