Solved

Open a Form to text and not ID

Posted on 2015-02-22
3
105 Views
Last Modified: 2015-02-22
Experts, I am trying to open a form to 2 criteria.  It seemed to work just fine with one criteria but there seems to be an error in the second criteria in this section:   & "[Timing]= '" & Me!txtTiming & "'"

    DoCmd.OpenForm "frmCovenantHistory", acFormDS, , "[Description]= '" & Me!txtDescription & "'" & "[Timing]= '" & Me!txtTiming & "'"


Please let me know how to open a form with 2 criteria.  This is not the preferred way to open the form but I am working with raw data from an import and there is no ID.  

thank you
0
Comment
Question by:pdvsa
[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
3 Comments
 
LVL 22

Accepted Solution

by:
rspahitz earned 500 total points
ID: 40624973
You need to put some kind of joining command between the two, such as AND:

 DoCmd.OpenForm "frmCovenantHistory", acFormDS, , "[Description]= '" & Me!txtDescription & "' AND " & "[Timing]= '" & Me!txtTiming & "'"

Open in new window

0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40624984
You are missing a logical operator such as AND or OR.  In your case, you probably want AND so that the returned records meet both criteria.

DoCmd.OpenForm "frmCovenantHistory", acFormDS, , "[Description]= '" & Me!txtDescription & "' AND [Timing]= '" & Me!txtTiming & "'"

Open in new window


Ron
0
 

Author Closing Comment

by:pdvsa
ID: 40625037
Thank you....worked perfectly.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
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.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

635 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