473,396 Members | 1,760 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,396 software developers and data experts.

Double click to open record performs no action

I've been struggling several time with this problem and apparently its driving me a little crazy: i have this code

Expand|Select|Wrap|Line Numbers
  1. Private Sub CodeNumber_DblClick(Cancel As Integer)
  2. DoCmd.OpenForm "Products", , , _
  3.         "[products.codenumber]=" & "'" & Me.CodeNumber & "'"
  4.  
  5. End Sub
I cannot understand why on other forms this code works flawlessly and sometimes on others no. I have used this sort of code many other times on lots of other forms and worked properly but in this one, nope! The form automatically open on double click and where it is suppose to load the record, the form 'products' open itself with no loaded record.

What in the heck is wrong?

Update:

Further testing made: removed all code and enabled and unlocked some disabled fields from form Products, changed "'" with "", "#"

Tried this code as well

Expand|Select|Wrap|Line Numbers
  1. "[products.codenumber]=" & "'" & Forms![search_advancedstock]![search-advancedstock-datasheet]![CodeNumber] & "'"
and still nothing...
Jun 1 '12 #1
4 1981
dsatino
393 256MB
if the codenumber field is numeric, you have to remove the single quotes
Jun 1 '12 #2
tried as well for trial purposes. didn't worked either. however the code number is composed of numeric and text so single quote is to be used
Jun 1 '12 #3
Rabbit
12,516 Expert Mod 8TB
[products.codenumber] will only work if your field is actually named that. Which I doubt. You're either looking for [products].[codenumber] or just simply [codenumber].
Jun 1 '12 #4
Thanks for your input rabbit. After spending hours trying to find the answer to the question, i finally found out that it was all fault of a statement in a query. Set a workaround on a new query and fixed the problem. Thanks all!
Jun 1 '12 #5

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

Similar topics

1
by: edself | last post by:
I have a form which displays a subform datasheet of information. I'd like to be able to quickly click on a particular record and open up another form showing more detailed information about that...
3
by: N. Graves | last post by:
Hello, I'm having trouble with a feature that I would like to add to my database. I would like to have the ability to double click a record on a Sub form and that action would open that...
2
by: Uninvisible | last post by:
I have put together a db for a law firm to keep track of counterfeit activities. There are four parent tables: tblContact tblTransaction tblAction tblFile I have created a form,...
0
by: Lloyd Sheen | last post by:
I am trying to do two things from a listview. First is on a double click to perform an action on the object which was double clicked. FullRowSelect is set to true for the Listview. Code for the...
1
by: scott_gui | last post by:
Creating a Windows application: <Double-Button-1> mouse event has a conflict when there is also a binding to the <Button-1> event. It seems like a silly oversight that performing a double click...
2
by: scott_gui | last post by:
I am creating a Windows application: The mouse event <Double-Button-1> has a conflict when the <Button-1> event also has a binding. Double clicks will first perform the single click action. This...
2
by: Jpipher | last post by:
Let me explain what I am trying to accomplish... Two forms -- we'll call them "Main" and "Related" A command button on "Main" runs a union query. The union query results are shown in "Related"...
3
by: ali3n8 | last post by:
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...
0
by: slinky | last post by:
I'm using VS2003 VB.net/ASP.net and have a Datagrid on an .ASPX page that is successfully displaying the records I was expecting. The next step I want to do is to double-click a line (record) and...
3
by: thayes5150 | last post by:
I have an Access 2003 database used to research unemployment claims. The main form contains a subform in datasheet view listing the employee claim records, including employee Social security number....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.