Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macola Progression Designer

Status
Not open for further replies.

jmccall

MIS
Sep 10, 2002
26
US
Is it possible to default a field to the current system date? Example: On the Order Entry screen can the ship date be defaulted to the current date vs A.S.A.P which stores as 0. I've been able to make the field required but to avoid the likely hood of typo's I'd like the default to be the current date.


 
You can't do this with screen designer, but you can do it with Flexibility code:

Code:
Private Sub ShipDate_GotFocus()
    ShipDate.Text = Month(Now()) & "/" & Day(Now()) & "/" & Year(Now())
End Sub


Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Just to elaborate on the flex solution (the only way I know how to do it as well).

1. You will need to own the flexibility module.
2. If you already have flex then I would take the moment to describe how and why Don's code works.

In progression flex you can not set the value of a control on the form until it has "Focus".

You may want to add in a couple of lines of code to check and see if you are in add or edit mode so as not to change the dates on existing orders.

Just my $.02


Andy Baldwin

"Testing is the most overlooked programming language on the books!"

Ask a great question, get a great answer. Ask a vague question, get a vague answer.
Find out how to get great answers FAQ219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top