The Question:
How do I blank a date field in a bound form? I’m not good enough yet to create and work with unbound forms and get anything done.
The Why of the Question:
I’ve created an order, repair, and ship database where the repairs are matched to the initial repair order. The part that’s a bit different about this project is that, the repaired parts go into a pool of repaired units and may go back to any one of 4,000 different clients.
The Code I wrote:
Input of “Defective Received Date” seems like a very simple thing to do. First I gave it a DEFAULT value, but it sometimes did not work. I decided it was just as easy to go into the EVENT handler for the FORM itself and put in the following code:
If IsNull([Defective Received Date]) then [Defective Received Date] = Date()
This works great, but not really. The escape function will get rid of the date, if I escape out of the form; that’s the great part. However, I found some users who will go in, put a date in, not put in the proper unit serial number and now when the script runs to check the validity of the serial number (Do I have that Serial Number in the system or not), it leaves the date in there [I want to delete the date from the field since it should not be saved without the serial number being in].
I’ve been trying to find anything that will tell me how to do this, and I cannot find it.
Thanks in advance for your help.
How do I blank a date field in a bound form? I’m not good enough yet to create and work with unbound forms and get anything done.
The Why of the Question:
I’ve created an order, repair, and ship database where the repairs are matched to the initial repair order. The part that’s a bit different about this project is that, the repaired parts go into a pool of repaired units and may go back to any one of 4,000 different clients.
The Code I wrote:
Input of “Defective Received Date” seems like a very simple thing to do. First I gave it a DEFAULT value, but it sometimes did not work. I decided it was just as easy to go into the EVENT handler for the FORM itself and put in the following code:
If IsNull([Defective Received Date]) then [Defective Received Date] = Date()
This works great, but not really. The escape function will get rid of the date, if I escape out of the form; that’s the great part. However, I found some users who will go in, put a date in, not put in the proper unit serial number and now when the script runs to check the validity of the serial number (Do I have that Serial Number in the system or not), it leaves the date in there [I want to delete the date from the field since it should not be saved without the serial number being in].
I’ve been trying to find anything that will tell me how to do this, and I cannot find it.
Thanks in advance for your help.