Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Open a Form to text and not ID

Posted on 2015-02-22
3
Medium Priority
?
112 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

722 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