Automatically filling a text box from another table?

G

Guest

I have a table created by a maketable query that holds one item in a single
field. table [CurrentUser] field [UserInitials]
I want to add a control in a data entry form [frmTransEntry] that will pick
up this item and insert it into the record being created - table
[Transaction] field [User] I have tried a text box (couldn't pick up the
item), combobox and listbox bound to [User] and picking up data from
[CurrentUser]. These last more or less worked but I have to click the
combobox or listbox and I would prefer it to be automatic, invisible even.
Can anyone help?
 
G

Guest

hi,
You could use dlookup..
Me!txtDescription = DLookup("[ItemName]", "IMA", "[ItemID]
='" & Me!txtItemID & "'")
careful. this wrapped on me. it's suppose to be 1 line.
i use the dlookup above. when i enter the item number in
one text box, the item's discription pop in the the text
box under it.
works
regards
 
G

Guest

I'm not looking up anything related to what's on the form. I just want the
form to pick up the single item in [CurrentUser].[UserInitials]
All variations on Dlookup return #Name

hi,
You could use dlookup..
Me!txtDescription = DLookup("[ItemName]", "IMA", "[ItemID]
='" & Me!txtItemID & "'")
careful. this wrapped on me. it's suppose to be 1 line.
i use the dlookup above. when i enter the item number in
one text box, the item's discription pop in the the text
box under it.
works
regards
-----Original Message-----
I have a table created by a maketable query that holds one item in a single
field. table [CurrentUser] field [UserInitials]
I want to add a control in a data entry form [frmTransEntry] that will pick
up this item and insert it into the record being created - table
[Transaction] field [User] I have tried a text box (couldn't pick up the
item), combobox and listbox bound to [User] and picking up data from
[CurrentUser]. These last more or less worked but I have to click the
combobox or listbox and I would prefer it to be automatic, invisible even.
Can anyone help?
.
 
G

Guest

Instead of keeping [UserInitials] in a table, I held it in a form and made
the form invisible (me.visible = false) Then I referred the text box to the
text box in the invible form and it worked a charm.


Heather said:
I'm not looking up anything related to what's on the form. I just want the
form to pick up the single item in [CurrentUser].[UserInitials]
All variations on Dlookup return #Name

hi,
You could use dlookup..
Me!txtDescription = DLookup("[ItemName]", "IMA", "[ItemID]
='" & Me!txtItemID & "'")
careful. this wrapped on me. it's suppose to be 1 line.
i use the dlookup above. when i enter the item number in
one text box, the item's discription pop in the the text
box under it.
works
regards
-----Original Message-----
I have a table created by a maketable query that holds one item in a single
field. table [CurrentUser] field [UserInitials]
I want to add a control in a data entry form [frmTransEntry] that will pick
up this item and insert it into the record being created - table
[Transaction] field [User] I have tried a text box (couldn't pick up the
item), combobox and listbox bound to [User] and picking up data from
[CurrentUser]. These last more or less worked but I have to click the
combobox or listbox and I would prefer it to be automatic, invisible even.
Can anyone help?
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top