?
Solved

How open form to specific record

Posted on 2011-02-25
3
Medium Priority
?
285 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 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

749 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