?
Solved

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

Posted on 2013-10-31
5
Medium Priority
?
445 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 2000 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
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.
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…
Suggested Courses

752 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