Hyperlinks with IIfs

  • Thread starter Thread starter geeves1293
  • Start date Start date
G

geeves1293

Hello all,

I have made a form in datasheet view which picks out certain customers jobs
(past & present) controlled by a dialog box lookup customers.

This outputs the necessary information I have asked for, I then browse for
the job I'm looking for, note down the unique autonumber and go and look that
up in a report.

I would like to skip the part of noting down the number and just press the
unique autonumber via hyperlink and the onClick function opens the report I'm
after. Is this possible??

Many Thanks

Graham
 
I'd use the Double-Click event of the JobID or CustomerID, whichever is
appropriate for the autonumber to are using. You do not need a hyperlink,
just the autonumber. Sample code might look something like:


Private Sub JobID_DblClick(Cancel As Integer)
DoCmd.OpenReport "ReportName", , , JobID = Me.JobID
End Sub
 
Thanks for your response Arvin,

Thats sounds interesting, just 1 question though when looking at your code:-

My job numbers which is the key autonumber i.e. 18484. Do I put 18484 in
the code or does it know that I want 18484 when I double click that number?

Thanks for your help so far.

Graham
 
Back
Top