Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
?
447 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
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.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

604 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