473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

docmd problems

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.

3 1343
TheSmileyCoder
2,322 Expert Mod 2GB
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
It was in the query. Many thanks
Jun 6 '12 #3
TheSmileyCoder
2,322 Expert Mod 2GB
Your welcome. :)
Jun 6 '12 #4

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

Similar topics

1
by: Alex Wisnoski | last post by:
Access 97SR2-I am trying to create a Job Position data entry form based on a table. The form has 15 fields on it. I want to use a combo box to look in the table and see if the position number...
0
by: nic | last post by:
Hi I am currently having problems getting two forms to behave the way I want. I have two tables Student and Application, and their respective forms. (Tables)Student has StudentID (PK) & an...
4
by: John Ortt | last post by:
Hi Everyone, hope you can help. Our company has recently migrated from NT and Access 97 to XP and Access 2003 and in the process a number of problems have surfaced. The team I work in are...
2
by: madeleine | last post by:
I'm hoping the answer to this is that I'm just doing something silly, but I'm really scratching my head over this one. I'm importing data from multiple workbooks, each workbook has a sheet called...
1
by: Wes Brooks | last post by:
Hello expert, Please help me with the following problems. I have spent ages to resolve them but no luck. I have two forms. (1) "Document Reception Input Form" is the main form. The search...
3
by: stumo | last post by:
Hi I'm fairly new to access and as such my experience of VBA is somewhat limited. I have a login form which is linked to an "employees table" which asks for users to enter their name and...
4
by: RAG2007 | last post by:
Hi Having some problems with docmd.findrecord, getting runtime error 2162, in an adp, sql server back end. On my main form, I have a continuous view subform giving a list of subrecords within...
6
by: Tomino | last post by:
Hi, I am working on a log in form for an Access 2003 db. Because the built-in jet database engine doesn't supply the ability to record every log attempt, failed attempt, validate passwords, user...
12
truthlover
by: truthlover | last post by:
I have a problem that's difficult to explain, so please be patient. The database is in 2000 format, though I'm doing most of the designing in 2007 (saved as 2000 format, of course) I have a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.