Hyperlinks with IIfs

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
 
A

Arvin Meyer [MVP]

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
 
G

geeves1293

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top