Solved

How open form to specific record

Posted on 2011-02-25
3
277 Views
Last Modified: 2013-11-05
I want to open a form to a specific record from an onclick event in a command button.  Here is my syntax but it doesn't work,  Can someone help?

docmd.openform "frmIncidentDataNEW",,,"[RecN]='" & me.cboSelectRecord &"'"

Note:  RecN is a number.

--Steve
0
Comment
Question by:SteveL13
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
VTKegan earned 500 total points
ID: 34979299
If RecN is a number you need


DoCmd.OpenForm "frmIncidentDataNEW",,,"[RecN]=" & Me.cboSelectRecord
0
 
LVL 10

Expert Comment

by:VTKegan
ID: 34979308
You should only apply the ""s aroung the criteria if RecN is a string (Text)

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34979362
if the bound column of the combo is not the RecN, you have to specify the column no

DoCmd.OpenForm "frmIncidentDataNEW",,,"[RecN]=" & Me.cboSelectRecord.column(1)
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question