cancel
Showing results for 
Search instead for 
Did you mean: 

User fields, dates and Screen Painter.

Former Member
0 Kudos

Hi folks,

I'm blocked in a (as I think) simple thing. In a form created with ScreenPainter, How can I set a default date in an input box linked with an user field with type as date?

This two codes crashes

Me.Form.Items.Item("txtTaxDate").Specific.Value = String.Format("{0:s}", Now())

...

Me.Form.Items.Item("txtTaxDate").Specific.Value = Now()

Thanks in advance!

Oscar S.M.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

what's the error message you got?

may be try this:



Me.Form.Items.Item("txtTaxDate").Specific.Value = Now.ToString("yyyyMMdd")

Former Member
0 Kudos

Thanks the problem was our PCs had the date format is Spanish format (dd/mm/yyyy).

Bye

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Oscar,

I use the following code.


With oForm.DataSources.DBDataSources.Item("TABLE")
	.SetValue("U_DATE", .Offset, Format(Now, "yyyyMMdd"))
	.SetValue("U_HOUR", .Offset, Format(Now, "HHmm"))
End With

Regards,

Vítor Vieira