473,509 Members | 2,918 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open form if I click on data in a subform

6 New Member
Dear All,
I have main form "Job" and one subform "Offer"
In a subform I have combo box Contacts.
How can I open form Contacts if I dbl click on a combo box in my subform where condition ID = Contacts!

Thank you in advance!
Sep 25 '08 #1
3 1300
wassimdaccache
222 New Member
on event double click try to insert this code
Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim stDocName As String     
  3. Dim stLinkCriteria As String      
  4. stDocName = "Contacts"          
  5. stLinkCriteria = "[ID]=" & [contacts]  
  6. DoCmd.OpenForm stDocName, , , stLinkCriteria
  7.  
Also you can you use from your toolbar create wizard button and ACCESS will create you the code


Regards,
Sep 25 '08 #2
Jozo
6 New Member
Dear!

I tried to insert your code but it is not correct.
Wrong: stLinkCriteria = "[ID]=" & [contacts]
Can't find this data!

Rgds
Sep 25 '08 #3
Jozo
6 New Member
I find answer...
DoCmd.OpenForm "Contacts", , , "[cID]=" & [oCustomer], , acDialog
ID - primary key in a tabele Contacts
Customer - name of the combo box in a subform "Offer"

Rgds....
Sep 25 '08 #4

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

Similar topics

3
4920
by: Illya Havsiyevych | last post by:
Hello All I have splitted my MDB into MDE and data MDB. In old whole MDB I have next piece of code to create an instance of a form with subform. ..... Dim objForm As New ...
1
12009
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...
1
314
by: Richard | last post by:
Thats a mouthfull of a title what I'm after should be really simple. I have a form with a subform which itself has a subform the final subform contains an individuals record. The individuals...
25
10168
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
6
21567
by: erick-flores | last post by:
Hello all, Form A & Form B Form B opens when I click on a button from Form A. How do I setup Form B so it will always let me insert new records. Because right know, when I click on the button...
4
3142
by: piscogirl | last post by:
Hi all, Here's my case: I have a form: Event Form and a subform: AttendanceSubForm The user selects a name (from a Person Table) on the subform to register for the event. If the name is...
4
13388
by: Leah Trahan | last post by:
I am new at Access, databases, AND posting threads (sorry). I have a subform that is a continuous form based on a tabular query. I enter a particular serial # (on the main form) and the subform...
3
1725
by: Zippy | last post by:
I have recently moved from A97 to A2003. I find it inconvenient that I can no longer double-click on the subform to open it in full view. I had a hunt around the newgroups and couldn't find...
0
7237
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
7137
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
7347
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
7416
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
5656
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,...
1
5062
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...
0
1571
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
779
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.