Automatically filling a text box from another table?

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
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?
.
 
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?
.
 
Back
Top