Default date

Dr_Worm

Board Regular
Joined
Jul 28, 2003
Messages
103
I have a main form (Form A) where all the information is to be entered. Then I press a button which opens up another form (Form B) that has additional information to that job. Within form B there is a date field that has a default value set to the current date which works if no information has been entered into form A. When I enter information into form A and then go to form B the default date value does not work and appears blank.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Have you tried setting vba code for Form Load.

Private Sub Form_Load()
txtbox1.value = now
End Sub


Or in the design view on form two, go to design view, right click on the text box that you want your default date in and type in = now This will give you the current date. If you want to customize it select input mask and choose the that meets your needs. Good Luck!
 
Upvote 0

Forum statistics

Threads
1,221,596
Messages
6,160,716
Members
451,665
Latest member
PierreF

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top