![]() |
MS Access Query
Hi,
I have a userform in Excel where I input a name and when I click on a command button it should pull data corresponding to the name in the TextBox and display it as a caption on some labels. For e.g. If I input name ABC in the textbox, I want to pull ABC's address from the access database and display it on the corresponding label on the userform. I have the following query: "SELECT [Address] FROM ex_table WHERE [Analyst]= UserForm1.txtname.Text'" But it does not work. Can someone help with the code? Thanx. |
MS Access Query
Hi Thanx
Try "SELECT [Address] FROM ex_table WHERE [Analyst]='" & UserForm1.txtname.Text & "'" HTH. Best wishes Harald "Purnima" skrev i melding ... Hi, I have a userform in Excel where I input a name and when I click on a command button it should pull data corresponding to the name in the TextBox and display it as a caption on some labels. For e.g. If I input name ABC in the textbox, I want to pull ABC's address from the access database and display it on the corresponding label on the userform. I have the following query: "SELECT [Address] FROM ex_table WHERE [Analyst]= UserForm1.txtname.Text'" But it does not work. Can someone help with the code? Thanx. |
All times are GMT +1. The time now is 02:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com