|
User #77055 1890 posts
Whirlpool Enthusiast
|
I have a form, and want to add default text to particular fields in the form at the click of a button. Is this possible? |
posted 2008-May-14, 7pm AEST
|
|
User #2044 7399 posts
Whirlpool Forums Addict
|
Give the fields unique ID's and in the button press function assign your text to the .text method(?). |
posted 2008-May-14, 8pm AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
Give the fields unique ID's |
posted 2008-May-14, 8pm AEST
|
|
User #2044 7399 posts
Whirlpool Forums Addict
|
What have you got so far? |
posted 2008-May-14, 8pm AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
What have you got so far? |
posted 2008-May-15, 12pm AEST
edited 2008-May-15, 12pm AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
tried to create a macro, but didnt work. |
posted 2008-May-17, 12pm AEST
|
|
User #28640 379 posts
Forum Regular
|
Not sure which language/IDE you are using for this, but maybe when loading a page set them all to empty, and when prefill is clicked loop through the fields and get their default values and set them? |
posted 2008-May-17, 12pm AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
Not sure which language/IDE you are using for this, but maybe when loading a page set them all to empty, and when prefill is clicked loop through the fields and get their default values and set them? |
posted 2008-May-17, 4pm AEST
|
|
User #30842 2528 posts
Whirlpool Forums Addict
|
I have to say your question is so vague, that even asking for clarification invites misunderstanding. |
posted 2008-May-17, 5pm AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
Behind your command button in the onclick event type |
posted 2008-May-17, 6pm AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
me.textbox1.text = "Default stuff here" |
posted 2008-May-17, 6pm AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
correction: it works, but only if the whole form is created using control tools, rather than form tools. |
posted 2008-May-17, 6pm AEST
edited 2008-May-17, 6pm AEST
|
|
User #30842 2528 posts
Whirlpool Forums Addict
|
Assuming you are using, what you call a control tool, then I guess you have to use bookmarks. Using bookmarks for user entered text is not a good idea, as they will delete the bookmark. |
posted 2008-May-18, 12am AEST
edited 2008-May-18, 12am AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
Me I would just use a text box. |
posted 2008-May-18, 12pm AEST
edited 2008-May-18, 12pm AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
eureka, i foudn this article: |
posted 2008-May-18, 9pm AEST
edited 2008-May-18, 9pm AEST
|
|
User #3103 2165 posts
Whirlpool Forums Addict
|
Do you mean: |
posted 2008-May-19, 1am AEST
|
|
User #30842 2528 posts
Whirlpool Forums Addict
|
AFAIK you reference fields in VBA by their bookmark name. I have given you some code for that. |
posted 2008-May-19, 10am AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
Checkbox1 is not an official name for a checkbox, |
posted 2008-May-19, 11am AEST
edited 2008-May-19, 11am AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
Do you mean: |
posted 2008-May-19, 11am AEST
|
|
User #30842 2528 posts
Whirlpool Forums Addict
|
Me.CheckBox1.Value = True |
posted 2008-May-19, 12pm AEST
|
|
User #77055 1890 posts
Whirlpool Enthusiast
|
Me.CheckBox1.Value = True |
posted 2008-May-25, 11pm AEST
|