Solved

how to open a from one form another form with a few where conditions in access 2013

Posted on 2013-10-31
5
444 Views
Last Modified: 2013-10-31
hi

i have a command button that open another form and have a where condition that by the  field reminderdate the date has been already, so it's have two conditon, that the reminderdate field is not null, and the date has been already.

how i write this two condions something like this:

DoCmd.OpenForm "MIncomeDetailsF", , , ReminderDate <= Date and reminderdate<>""

Open in new window

thanks alot
0
Comment
Question by:bill201
[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
  • 2
5 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 39613642
Try this:


DoCmd.OpenForm "MIncomeDetailsF", , , ReminderDate <= Date and reminderdate IS NOT NULL

Open in new window


Or this:


DoCmd.OpenForm "MIncomeDetailsF", , , ReminderDate <= Date and IsDate(reminderdate) = True

Open in new window

0
 

Author Comment

by:bill201
ID: 39613671
thansk for your answer but it's dosn't work, it's open the form MIncomeDetailsF with no data in that, like there is no record that matching  the Criterias (although that the form conatin data that match this criterias).
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 39613678
Oh - we forgot the quotes on the conditions:

DoCmd.OpenForm "MIncomeDetailsF", , , "ReminderDate <= Date() and reminderdate IS NOT NULL"

Open in new window


Or this:

DoCmd.OpenForm "MIncomeDetailsF", , , "ReminderDate <= Date() and IsDate(reminderdate) = True"

Open in new window

0
 

Author Comment

by:bill201
ID: 39613686
now it's working thanks alot
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39613688
This is a slightly cleaner variation... using a string variable for the criteria:


Dim strSQL as String
strSQL = "ReminderDate <= Date() and reminderdate IS NOT NULL"
 
DoCmd.OpenForm "MIncomeDetailsF", WhereCondition := strSQL

Open in new window


Or this:

Dim strSQL as String
strSQL = "ReminderDate <= Date() and IsDate(reminderdate) = True"
DoCmd.OpenForm "MIncomeDetailsF", WhereCondition := strSQL

Open in new window

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

729 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