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

docmd problems

P: 2
I am trying to add a search function to a company datbase. Each company as a company number as a unique identifier. The problem I am having is when I double click a search result it asks me for the comapny number. If I dont enter anything and just click ok it takes me to the correct record. How do i stop it from asking for the company number?

Expand|Select|Wrap|Line Numbers
  1. Private sub 1sttitles_dblclick(cancel as integer)
  2.  
  3. Dim intx as string
  4. dim intselecteddocument as string
  5.  
  6. intx= me.1sttitles.listindex
  7. intselecteddocument=me.1sttitles.itemdata(intx)
  8.  
  9. docmd.openform "company_record",,, "[tbl_company_number]"& "'" & intselecteddocument & "'"
  10.  
  11. docmd.close acform, "frmsearch"
  12.  
  13. end sub
Jun 6 '12 #1

✓ answered by TheSmileyCoder

I dont think its the code you have presented here thats asking for the company number. It its either in the open or load event of the "company_record" form or in its underlying query. You will have to look there.

Share this Question
Share on Google+
3 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
I dont think its the code you have presented here thats asking for the company number. It its either in the open or load event of the "company_record" form or in its underlying query. You will have to look there.
Jun 6 '12 #2

P: 2
It was in the query. Many thanks
Jun 6 '12 #3

TheSmileyCoder
Expert Mod 100+
P: 2,321
Your welcome. :)
Jun 6 '12 #4

Post your reply

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