Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How open form to specific record

Posted on 2011-02-25
3
Medium Priority
?
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
VTKegan earned 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

609 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