My code doesn't wants to set the control default value (1 Viewer)

Mihail

Registered User.
Local time
Today, 12:58
Joined
Jan 22, 2011
Messages
2,373
Hello !
I know that is very unusual to do what I do now.

But, are you so kind to take a look to this thread on other forum ?
Hope someone have a idea.

Thank you !
 

pr2-eugin

Super Moderator
Local time
Today, 10:58
Joined
Nov 30, 2011
Messages
8,494
The reason I could think of is. Form Open is very early for setting this.. Try the Form Load.. You mention using Form Load everywhere but your code shows Form_Open
 

Mihail

Registered User.
Local time
Today, 12:58
Joined
Jan 22, 2011
Messages
2,373
Thank you for reply, Paul.
The reason I could think of is. Form Open is very early for setting this.. Try the Form Load.. You mention using Form Load everywhere but your code shows Form_Open

I've tried this. Same result.
 

JHB

Have been here a while
Local time
Today, 11:58
Joined
Jun 17, 2012
Messages
7,732
It needs to surrounded by quotes like:
Code:
.DefaultValue = """" & Me.OpenArgs & """"
Also look at the field size in the table, (or post some sample database).
 

Mihail

Registered User.
Local time
Today, 12:58
Joined
Jan 22, 2011
Messages
2,373
Ufff, JHB.
That is. Thank you !

Works with double quotes as you say and even with single quotes:
Me.Tip.DefaultValue = "'" & Me.OpenArgs & "'"

Thank you again !
 

JHB

Have been here a while
Local time
Today, 11:58
Joined
Jun 17, 2012
Messages
7,732
You're welcome. (If the field size is to short, you'll get the same error.)
 

Users who are viewing this thread

Top Bottom