A
Art Vandaley
Hi,
I have two questions:
1)
I try to change defaultvalue property of a Table's field with using code.
That code is run inside Autoexec macro and it has a inputbox asking a string
like "Myvalue". I want the function changes one of the table1's field's
default value as "Myvalue". For this reason I wrote a function doing this.
I've written something like:
Public Function AD()
Dim Message, Title, Default, MyValue
Message = "Please enter your name"
Title = "User Information"
Default = "Name"
MyValue = InputBox(Message, Title, Default)
(*) table1!field1.defaultvalue= Myvalue
End Function
The row I marked with (*) is not accepted (debug window opens). How can I
correct it?
2) I want "Myvalue" to be asked only one time (first time that user opens
the database). What kind of check to be done by above code?
I will appreciate your help. Best Regards.
I have two questions:
1)
I try to change defaultvalue property of a Table's field with using code.
That code is run inside Autoexec macro and it has a inputbox asking a string
like "Myvalue". I want the function changes one of the table1's field's
default value as "Myvalue". For this reason I wrote a function doing this.
I've written something like:
Public Function AD()
Dim Message, Title, Default, MyValue
Message = "Please enter your name"
Title = "User Information"
Default = "Name"
MyValue = InputBox(Message, Title, Default)
(*) table1!field1.defaultvalue= Myvalue
End Function
The row I marked with (*) is not accepted (debug window opens). How can I
correct it?
2) I want "Myvalue" to be asked only one time (first time that user opens
the database). What kind of check to be done by above code?
I will appreciate your help. Best Regards.