Solved

Open a Form to text and not ID

Posted on 2015-02-22
3
82 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
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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 …

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now