vba - Query by Form: How to incorporate date ranges taken from a form -


The following code does not seem to work (added in the criterion of query in MS Access) when I only with DTDAT I try the condition, it works fine, but when I apply the second condition, its work never gets done.

= [Form]! [DtDateFrom] and & lt; = Two dates of the code below have been compared [forms]! [DRDM AGRAR]! [DTDTO]

  'Check that Dates are valid if Maye DTDATO & lt; = METDETFrom 'then ask the user to change the dates, then pop up the message as they are not valid messageboxes ("Sorry,' Date 'can not be before' Date '& amp; vbCrLf & amp; Choose a different date range ") Other 'Something else is End if   

Your code does not work and because of - - It means to test two conditions for truth, Typically

example

a = 5

if someone has a & lt; 10 and one & gt; 4 Do something

In order for both of these conditions to work, this should be true

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -