Link to home
Start Free TrialLog in
Avatar of NiceMan331
NiceMan331

asked on

Setting Default for date field in form

i have table , HAVING field , Pay_Date
i want to set its default value by choosing from a combo box
1- what is the code of set default value via form
2-how to fill the data of combo box by ending date of all months , e.g :
31-01-2013 , 28-02-2013 , 31-03-2013 .. etc
ASKER CERTIFIED SOLUTION
Avatar of Naveen Kumar
Naveen Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NiceMan331
NiceMan331

ASKER

thanx for explanation
1-the combo box will be on one form , and the field to be update will be on another one
so , pay_date (date format) := (the value of combo box on outside form )
2-what about the years , if now the value is : 31-12-2014 , then add_month will make it : 01-01-2015 ?
1. i guess that should work though i do not understand what do you mean by outside form. do you mean another block in the same form or something else ?

2. it depends right, if you run the loop for only 3 or 4 times then the result value will be the end of the months for the next 3 or 4 months only but if you run it for more than that will go on accordingly. If you iterate the loop for 15 or 20 times, then obviously we will get the end of the months of the next year as well right.

Thanks
do you mean another block in the same form or something else ?
yes another form
i have form name "startup" form (having the combo box ) , from this form i have a command to open transaction form ( which having pay_date)
then i guess you need to use global variables to transfer/access the variables across teh forms. please refer to the forms manual/instruction guide for the use of global variables and then go from there.
i will ,
thanx
Good and Thanks