Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Set Field and Clear difference?


This topic is 8298 days old. Please don't post here. Open a new topic instead.

Recommended Posts

quote:

Originally posted by danjacoby:

I never use the "Clear" command; it has proven horribly unreliable. SetField[Fieldname, ""] does the trick very nicely.

I agree with you. The only time I use Clear is for clearing date or time fields. The only reason I asked is because I seen some posts in the Forum that suggested otherwise. I wanted to be sure that I didn't miss something.

[ February 13, 2002, 02:21 PM: Message edited by: MattSBCNE ]

Link to comment
Share on other sites

The way to 'clear"date and time fields is

Set Field [ Datefield, TextToDate("") ]

Set Field [ Timefield, TextToTime("") ]

I know it seems funnym but "" is text!

Link to comment
Share on other sites

The main reason for using the Set Field command is that it will work no matter whether the field is on the current layout or not. Commands like Paste, Insert and Clear will only work if the field is on the current layout and you also have to have the "allow entry into field" option selected in the field format dialog. So, it's just a lot simpler and safer to use the Set Field command.

Link to comment
Share on other sites

I wish I could claim credit for that, but I cannot. It's from the "Tips from Tech Support" menu in the New Database dialog box (the one that appears with the list of Templates). A couple of other neat bits of info in it too.

Link to comment
Share on other sites

This topic is 8298 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.