Solved

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

Posted on 2013-10-31
5
430 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
  • 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

746 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

10 Experts available now in Live!

Get 1:1 Help Now