Home

Macros and Programming

 

CardboxForumsMacros and Programming > "Blank Fields"

Blank Fields

Current user: [none]
Register / Log In · Help

Posted By Post

PeterD

18-Dec-2013 12:00

Help again please! I have a field with dates in it (01/01/1976) and wish to either select all records that are blank or exclude all records that have date in them. I have tried "Exclude > 01/01/1900" and also "Exclude 01/01/1900:01/01/2300" but neither works, grateful for help please.
Peter

bert

18-Dec-2013 12:28

This are things you can find in the Help file...

However: exclude all records which has a number (or date) in it:
Exclude FIELDNAME : (colon)

That's all.
Regards
Bert

Mary Doyle

18-Dec-2013 13:26

If you do need to select a range of dates you need something like

Select "DT","1/1/2001" & ":"
OR
Select "DT","1/1/2001" & ":" & "31/12/2001"

Mary

PeterD

19-Dec-2013 11:28

Thak you for that, I had looked in the help menu and had tried that macro, however, when I run it it comes up with the error: Wrong number of arguments or invalid property assignment 'Exclude' (Position in macro line 1 character 1). I have typed in the macro exactly as you typed it above, ie no quotation marks etc. Grateful for any further help

PeterD

19-Dec-2013 11:33

For Mary Doyle: I have tried your macro I put Exclude "DT","01/01/1900" & "01/01/2300" - which ought to exclude any date between 1900 and 2300(?) but got the error: "Command failed. The parameter is incorrect (80070057) Position in macro line 1 character 1"
Not sure what I am doing wrong?

bert

19-Dec-2013 12:28

You forgot ":" ...

Exclude "DT","01/01/1900:01/01/2300" 'exclude all dates between 1/1/1990 and 1/1/2300 = a range

However this excludes all numbers (and dates) in a field

Exclude "DT",":" 'excludes all numbers

Regards
bert

PeterD

19-Dec-2013 14:56

Many thanks again, Exclude "DT",":" works fine - how simple!!

Mary Doyle

20-Dec-2013 08:39

Hi Bert,

Good to be reminded that Exclude "DT","01/01/1900:01/01/2300" works. I vaguely seemed to remember that sometime in the far distant past I needed to separate the 2 dates with &. May have been the previous Cardbox macro language. Retirement must have dulled my brain!

Peter,
"DT","1/1/2001" & ":" & "31/12/2001", is obviously unnecessarily cumbersome but it would have worked if you had copied it correctly. You only included & not & ":" &. Anyway, it was only intended as an example in case you needed it in the future and not relevant to the query you posted.

As always, Bert's solution Exclude "DT",":" is simplicity itself in solving that.

My very best wishes to all for a happy Christmas and good programming in 2014!

Mary

Quick Reply

Please log in or register before trying to post a reply.

 
© 2010 Cardbox Software Limited   Home