473,403 Members | 2,284 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,403 software developers and data experts.

OpenForm Method, wherecondition

I use Access 2003 and I'm having trouble setting the wherecondition for the Openform functions.
Usually it would look something like this

DoCmd.OpenForm "Contact", , ,wherecondition here

I want to be able to double click the field name for a specific record (contact name) on the projects form (which has contact name, dates, status, etc) and that would open the form contact and give me all the information for that specific contact but only that one.

so i guess the wherecondition should be something like
get the value from the field i double clicked (somebody's last name) and the open the form Contact but only display those records that match the last name with the one i double clicked.

I hope this is clear enough.
Any help would be greatly appreciated

Kevin

p.s., right now I have it set up so that when I double click the record on the projects form, it opens another form that asks for the persons last name. As you can imagine, i dont want to retype it everytime i need to check for somebody's personal information, especially since the information is right there stored in the field i just clicked
Oct 10 '07 #1
1 3607
ADezii
8,834 Expert 8TB
I use Access 2003 and I'm having trouble setting the wherecondition for the Openform functions.
Usually it would look something like this

DoCmd.OpenForm "Contact", , ,wherecondition here

I want to be able to double click the field name for a specific record (contact name) on the projects form (which has contact name, dates, status, etc) and that would open the form contact and give me all the information for that specific contact but only that one.

so i guess the wherecondition should be something like
get the value from the field i double clicked (somebody's last name) and the open the form Contact but only display those records that match the last name with the one i double clicked.

I hope this is clear enough.
Any help would be greatly appreciated

Kevin

p.s., right now I have it set up so that when I double click the record on the projects form, it opens another form that asks for the persons last name. As you can imagine, i dont want to retype it everytime i need to check for somebody's personal information, especially since the information is right there stored in the field i just clicked
Place similar code in the Dbl-Click() Event in the [Contact Name] Field of your Projects Form:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Contact_Name_DblClick(Cancel As Integer)
  2.   DoCmd.OpenForm "frmContact", acNormal, , "[PrimaryKey]=" & Me![PrimaryKey], acFormEdit, acWindowNormal
  3. End Sub
  4.  
Oct 10 '07 #2

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

Similar topics

1
by: Nothing | last post by:
I have a form that the user types in a last name to search for then clicks a search button. Based on the information I want to open the form using the SQL Where statement that will pattern match...
6
by: beowulfs | last post by:
Here's what I've got: I've got a form with combo boxes. you can select already existing company names or type in new ones. if you type in a new one, it prompts you to double click the combo...
3
by: Lyn | last post by:
Hi, I have been experiencing a problem passing a LIKE statement in the WHERE argument of a DoCmd.Openform statement. I have posted that issue separately. However, in an attempt to work around...
4
by: dhowell | last post by:
I have a form with a continuous subform . subform has a combo box called . The following code is opening up the form, but is not applying the "Where" clause which is based on the combo box...
8
by: Mike Charney | last post by:
I am trying to write an Open Form command in VBA with a where clause in it. I need to be able to do two different where clauses: 1) With a between in it: i.e. Between Date1 and Date2 or...
4
by: SDL | last post by:
Help! I have a system that was running fine and I was testing a bottom level form. I went from a menu to a screen where I could enter a phone number or name to find a customer. If the customer...
13
by: HyBry | last post by:
I have been stuck for some time on this now. I have this code at the moment DoCmd.OpenForm "Form1", , , "Apps= '" & Form!App_Name & "'" Both fields Apps and App_Name are Bound to the same field...
3
by: gavm360 | last post by:
Hello, im trying to open a form from an dialog box form: the button on the dialog box has this on the onclick event: DoCmd.OpenForm "frmCASES_UNION", acViewNormal, , "MCH_CASECODE = #" &...
7
by: rik | last post by:
I am trying to build an Access 2002/2003 database application that I would like to offer to other writers so they can track submissions. Just trying to make a helpful tool for writers, poets, or...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.