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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating table from form

Status
Not open for further replies.

shazbot

MIS
Nov 20, 2000
25
0
0
US
I dont know access or any other database type program very well. I've got a very simple table with corresponding form. On the form I have a text box that displays the current logged in user. This text box is populated using a function. How do I get the user id info that is populated in the text box written to the table for the record each time its updated? Any help is appreciated.
 
How are ya shazbot . . .
shazbot said:
[blue]How do I get the user id info that is populated in the text box written to the table for the record each time its updated?[/blue]
You could set the [blue]Default[/blue] property of the textbox to the user! All added records would have the user ID or Name!

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
I'm poking around a bit, but to be honest I am not exactly sure on what you mean or how to do what you're suggesting. I appreciate it though.
 
shazbot . . .

Textboxes have a [blue]Default[/blue] property. When this property is updated to the [blue]current user[/blue], each new record will have that value automatically inserted. If the textbox is bound the value is automatically saved to the table when a record is saved.

Instead of
[tt] Me!TextboxName = YourFunctionName()[/tt]
You should have
[tt] Me!TextboxName.DefaultValue = """ & YourFunctionName() & """

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Aceman1 - Got it. It worked. Thanks again. On to the next problem.
 
shazbot . . .

Be aware ... the [blue]DefaultValue[/blue] only needs to be updated once per user. This makes the forms [blue]On Load[/blue] event prime for your function.

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top