By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,244 Members | 1,772 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,244 IT Pros & Developers. It's quick & easy.

Double Click on Name Field to show record

P: 50
I am using a search form that list records in my database. On the list that shows the records that have been found I have a field called First. When I double click on this field I would like to open that record in the form it was inputed on. I have been partially succesful doing this by using this code:

DoCmd.OpenForm "frmcustomerinformation", acNormal, , "[First]='" & Me("First") & "'"

I have attempted placing this code in the dblclick event and the singleclick event. It does open the form but does not populate the information on it until I go back to the form that shows the results and click or dbl click on it again. I just want to be able to double click and the record show with all the information there. Is there something im missing in my code or is there another way of doing this?
Aug 28 '07 #1
Share this Question
Share on Google+
3 Replies


missinglinq
Expert 2.5K+
P: 3,532
Never place this type of code into the Click event of a textbox, always use the Double Click event Otherwise your users cn't use the mouse to move into the textbox without triggering your code!

"does not populate the information on it until I go back to the form that shows the results and click or dbl click on it again." Click or double click on what? At any rate, try this instead:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm "frmcustomerinformation", acNormal, , "[First]='" & Me![First] & "'" 
Linq ;0)>
Aug 28 '07 #2

puppydogbuddy
Expert 100+
P: 1,923
I am using a search form that list records in my database. On the list that shows the records that have been found I have a field called First. When I double click on this field I would like to open that record in the form it was inputed on. I have been partially succesful doing this by using this code:

DoCmd.OpenForm "frmcustomerinformation", acNormal, , "[First]='" & Me("First") & "'"

I have attempted placing this code in the dblclick event and the singleclick event. It does open the form but does not populate the information on it until I go back to the form that shows the results and click or dbl click on it again. I just want to be able to double click and the record show with all the information there. Is there something im missing in my code or is there another way of doing this?
Try this variation on your code syntax and see if helps:

DoCmd.OpenForm "frmcustomerinformation", acNormal, , "[First]='" & Me!First & "'"
__________________________________________________ ___

If the above syntax does not help, try the filter method as shown below:

Dim strFilter as String

strFilter = "[First] = '" & Me!First & "'"

DoCmd.OpenForm "frmcustomerinformation", acNormal, strFilter
Aug 29 '07 #3

missinglinq
Expert 2.5K+
P: 3,532
I have merged your duplicate threads of this problem, which were posted a mere 23 minutes apart! Please refrain from this prohibited behavior in the future.

From FAQs


Do Not Double Post Your Questions
Double posting is where you start a thread on a topic and then for some reason start another thread on exactly the same topic in the same forum. Please do not do this because

1. It makes it very hard for people to answer you especially if there are answers happening in all the threads you have started because they have to read 2 or more threads in order to see what has already been said.
2. It swamps the forum with your problem resulting in less attention for the other threads.

If you feel for some reason that you post has been overlooked (for instance it hasn't had any replies) please do not repost the question. Post a message to the thread you started, this will bump it back to the top of the thread list for the forum.


Thank you for your attention in this matter.

Linq ;0)>
Aug 29 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.