Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setting textbox default value at run time

Status
Not open for further replies.

Saxie1

Technical User
Jan 20, 2000
15
US
I am using an option control to set the value of a text box in a form. When I add the record to the database the value transfers to the data base but the text box goes blank for the next record. How do I get the textbox value to stay the same in the next record unless the user changes it? This should be easy, but I just can't seem to get it!!!!<br>
thanks for the help, I'm pulling my hair out
 
It is a no brainer if your form's &quot;Record Source&quot; has something in it.<br>
AS Bill mentioned go in design view and pull up the forms properties.<br>
1. Is there something in the &quot;Record Source&quot; property.<br>
it's the top property, click the all TAB<br>
2. If so the your form is attached.<br>
<br>
Is there something in the textbox in question or does it say &quot;Unbound&quot; <br>
3. double click on it<br>
4. Look at the Second property from top &quot;Control Source&quot; <br>
5. If you click in the far right side of it there is an arrow. Click it you will see all of your Fields<br>
<br>
Or are you Calculating a value for this Textbox?<br>
In which case the Control Source has a calculation in it.<br>
This requires a different approach.<br>
<br>

 
Saxie,<br>
<br>
I figured out that you are trying to refer to previous record and set default value dynamically according to user's selection.<br>
<br>
There's an article in MS Knowledgebase:<br>
<A HREF=" TARGET="_new"><br>
With Dlookup-function in form's Default Value property you can refer to previous record and get the values to a new record (assuming you have sequential ID field)<br>
<br>
Good luck,<br>
Al
 
Lehtoant,<br>
This Dlookup article looks like exactly what I need. I haven't actually tried it yet, but it looks very promising. Thank you so much for taking the time to answer my cry for help.<br>
Saxie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top