Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 how to show the query result in the form control

Author  Topic 

harjinder
Starting Member

3 Posts

Posted - 2005-08-04 : 02:35:25
hi,
I have a query to display the maximum employee Id from the employee table show its result in the form with one increment.Please give me your suggestion regarding how it will done.
query is
"Select max(empid)+1 from employee"
Sql query is properly working but the problem is how to show its result inthe text box of the form whose enabled property is false.
waiting for reply
Thanks.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-08-04 : 02:42:40
You need to use Connection and Recordset objects

Set Rs=Con.Execute(Query)

then
textbox.text=rs(0)


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -