Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP: Populate corresponding userform text fields from access data
Hi all,
I have about 7 textbox fields on a userform I created(eg: Emp_Id, Last_name, First_name, Phone, Street, City, St). All this data is stored in an Access Database. Is it possible to populate: Last_name, First_name, Phone, Street, City and St from access database based on what I input in Emp_Id? Thanks in Advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP: Populate corresponding userform text fields from accessdata
There's some sample code here you could adapt:
http://support.microsoft.com/kb/146406 Just comment out this line: Set Rs = Db.OpenRecordset("Customers") and un-comment: 'Set Rs = _ 'Db.OpenRecordset("SELECT * FROM Customers WHERE Country = 'UK';") Update the SQL statement to filter based on your Emp_Id textbox. For example, "SELECT * FROM Customers WHERE Emp_Id = '" & Emp_Id.Value & "';" --JP On Oct 5, 2:46*pm, sam wrote: Hi all, I have about 7 textbox fields on a userform I created(eg: Emp_Id, Last_name, First_name, Phone, Street, City, St). All this data is stored in an Access Database. *Is it possible to populate: Last_name, First_name, Phone, Street, City and St from access database based on what I input in Emp_Id? Thanks in Advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Populate Userform Listbox with Access values | Excel Programming | |||
Populate userform listbox from access db | Excel Programming | |||
Variable input to populate data fields | Excel Discussion (Misc queries) | |||
Range of Cells to populate in a text box on a userform | Excel Programming | |||
Populate Userform text boxes in VBA with VLookup data from #2 worksheet | Excel Programming |