double click a record in a report... (1 Viewer)

SeanATech

Rookie but trying
Local time
Today, 13:02
Joined
Apr 13, 2011
Messages
35
Hey,
Im trying to get a report that when a person dbl_clicks on a field(LastName, FirstName) to take that record and open it in a form. Is there a way to do this because using gotorecord and findrecord are not working for me and I dont know much about VBA code. thanks
 
Local time
Tomorrow, 04:02
Joined
Aug 8, 2010
Messages
245
Your question appears to be asking how to double click on a report and open a form filtered to that control's value?
You can double click on a control on a form and open a report to show a report filtered to that control's value.
It doesn't work in reverse - reports are just for displaying data.
 

boblarson

Smeghead
Local time
Today, 11:02
Joined
Jan 12, 2001
Messages
32,059
Well, technically, if you have Access 2007 or 2010, you can do this. The process would be the same as doing it from a form to a report. In the double click event of the control you would put:
Code:
DoCmd.OpenForm "FormNameHere", acViewNormal, , "[IDFieldNameHere] = " & Me.IDFieldForThatRecordOnTheReportHere

But I agree with Jeanette that it is kind of backwards.
 

SeanATech

Rookie but trying
Local time
Today, 13:02
Joined
Apr 13, 2011
Messages
35
I do have access 2010. I agree that it is a little backwards but the reason is that I am using the reports to generate what Trouble tickets I have that are Not Started..and so far and then by double clicking on their name or id it will populate in a form for me.
 

SeanATech

Rookie but trying
Local time
Today, 13:02
Joined
Apr 13, 2011
Messages
35
Bob,
Thank you so much that does exactly what I wanted it to do.
 

Jer739

New member
Local time
Today, 13:02
Joined
Aug 16, 2011
Messages
3
This was exactly what I was looking for also. We created a basic form to enter quotes on, and in our company name is the & symbol. Is it possible to enter this symbol in an access form somehow? Every time I do it is automatically removed.

Also, we have a notes field in this form and I am unable to get spell check working in a notes field. Is this possible?
 
Local time
Tomorrow, 04:02
Joined
Aug 8, 2010
Messages
245
With the ampersand issue - &.
If you are doing a caption on a button or label, you can put 2 ampersands together - && - just like that without any space between them.

If you are doing data entry or edits into a textbox, the & is treated just the same as any other character.
 
Local time
Tomorrow, 04:02
Joined
Aug 8, 2010
Messages
245
Spell check issue in notes field - I just checked in both A2007 and A2010.
I opened a form that had a memo field and pressed F7 to do a spell check.
The spell check worked.

Here's something to try.
Make a test form (a new form) with a memo field on it - just a quick form - nothing fancy.
Type in the memo field and then press F7 - does the spell check work?
 

Jer739

New member
Local time
Today, 13:02
Joined
Aug 16, 2011
Messages
3
Thanks for the help, I was able to add the & sign to the form so the name displays correctly. About the spell check issue, I forgot that the problem started when we changed the notes field to a drop down list. The user frequently uses the same notes for this form, so he wanted to be able to pick them from a drop down. However when he adds a new note it does not spell check that field after the change. Sorry for not asking the correct question the first time, and thanks again for your help!
 

Jer739

New member
Local time
Today, 13:02
Joined
Aug 16, 2011
Messages
3
Our simple one page estimate form has buttons on the top to search for an estimate number, go to the previous/last record, etc.

We implemented the code above into a report, and double clicking on a field in that report brings up the form like we wanted. However when we get to the form using that method, the search feature and previous/last buttons do not work. Is there a way around this so that the user can still use the buttons that they are familiar with?
 
Local time
Tomorrow, 04:02
Joined
Aug 8, 2010
Messages
245
Spell check a listbox issue.
How is the user adding a new note to the notes listbox?

If you pop up a form where the user can add a new note, the user could do a spell check before the new note is added to the listbox.

If the user wants to edit one of the notes, you would do something like:
when user double clicks an entry on the listbox, your code would open a form with that note where the user could edit the note. That form would allow spell check of the note textbox.
 
Local time
Tomorrow, 04:02
Joined
Aug 8, 2010
Messages
245
Re: ""
Our simple one page estimate form has buttons on the top to search for an estimate number, go to the previous/last record, etc.

We implemented the code above into a report, and double clicking on a field in that report brings up the form like we wanted. However when we get to the form using that method, the search feature and previous/last buttons do not work. Is there a way around this so that the user can still use the buttons that they are familiar with? ""

The problem with opening the form from the report is caused by the code that opens the form to match the record on the report. That causes the form to open with a where condition that limits the form's record source to only one record - the one with the ID that matches that record on the report.
That is the reason why the search feature and previous/last buttons don't work.

One work around could be (untested idea) to put a button on the form that resets the form's record source to what it would be when you open the form normally (not from the report).

Perhaps the button could have code like:
Me.RecordSource = "QueryName", where QueryName is the usual record source for the form,

or Me.RecordSource = strSQL, where strSQL is the usual record source for the form.
 

Users who are viewing this thread

Top Bottom