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

Opening a form to a specific record from a form

I have a continuous form, frmA, that lists certain record fields from tblB. I want to be able to click on one of the records in frmA (just an on click event on one of the form fields) and have that open frmC to that specific record. Does that make sense? frmA references a query of tblB and frmC references tblB directly. I've tried the following in an on click event of one of the fields in frmA and had no luck:

DoCmd.openForm "frmB" , , , "[field1] = '" & Me![field1] & "'"

Any ideas?
May 3 '07 #1
2 1642
cyberdwarf
218 Expert 100+
AFAIK, you don't need the single quotes, as you are not writing SQL code here.

You definitely need the double quotes around the first part of the WHERE condition ("Field1 = " & ), but you only need the double quotes around the variable if you're using a string ("Field1 = """ & VarName & """").

HTH
Steve
May 3 '07 #2
Thanks Steve, that worked brilliantly.


AFAIK, you don't need the single quotes, as you are not writing SQL code here.

You definitely need the double quotes around the first part of the WHERE condition ("Field1 = " & ), but you only need the double quotes around the variable if you're using a string ("Field1 = """ & VarName & """").

HTH
Steve
May 3 '07 #3

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

Similar topics

11
by: Susan Bricker | last post by:
Hi. I am trying to open a form using 'openargs' parameter of the docmd.openform action. The problem is that I would like to pass the form some character (string) and integer data. My plan was to...
2
by: Not Me | last post by:
Hi, I'm opening one form from another, passing the criteria through using OpenArgs (this works correctly - I have tested with a msgbox). The problem is with the findfirst method, I get the syntax...
9
by: BLUE WATER | last post by:
Help, When I am finished entering in data into my form A, I press the save button that saves this new data to a new record. However I would like my other form to open at a specific record, the...
1
by: Ian | last post by:
I want to open a form at a particular record, but I think I'm running into problems because the recordsource query is executing asynchronously. In the form's open event I use...
7
by: Sam | last post by:
Hello All, We want our Call Service Representatives to be able to go back and view all the records in a table on a form. When closing and re-opening the form the form starts out as record 1 of 1...
3
by: MartinR | last post by:
Hi, I'm still new to writing code in vba as I've only been introduced to access three weeks ago. I have written this code below and it executes but does not do what I want it to do. What I want is...
7
by: mahgnilla | last post by:
Hi, I was wondering if anyone could help?! I have a button on one form (Participant form) that opens another form at a specific record (Learning Session form with specific session for that...
1
by: Martin Bentler | last post by:
Right now, I have a form, locked records, on which I have a CommandButton that opens a second form (much like the first) but open for editing, plus allowing the user to manipulate other areas of the...
11
by: casan.mike | last post by:
Hi all, I have a form called "customer_frm" with many records in it. I would like to have a form that has a combobox listing all the customers, and a button that open the "customers_frm" to...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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.