Hi
I put in the following code in the AfterUpdate event of the Ecode textbox :
Private Sub txtEcode_AfterUpdate()
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("Lab_Master_1")
rs.FindFirst "EmpNo" = txtEcode 'Numeric empno
If Not rs.NoMatch Then...
Hi MajP
The record is in the same table i m using to bind the form with. But dont u think that upon binding the controls (textboxes or whatever) which would b displaying the data, the first record would b shown there by default (like when the form is loaded) ? The table is pretty simple :
EmpNo...
Hi
As in :
SELECT EMPMASTER.EMPNAME, EMPMASTER.EMPNO WHERE EMPNO = txtboxEMPNO.value ?????
Also, how do i display the corresponding empname of the empcode (if its found). Is there a need to code the cmdButton too??
Thanks... JB
Hi MajP
yes u r right, the form is unbounded. I hadnt thought of binding it to the table. It was pretty stupid on my part. Upon binding it and now using the combobox (as specified in the FAQ ), the problem is how to display the rest of the details of that corresponding record? I am attaching...
hi MajP
i cut pasted the code in the FAQ in the AfterUpdate event of the txtBox1 as follows:
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
rst.FindFirst "EMPNO=" & txtEcode.Value 'its numeric
If rst.NoMatch Then
MsgBox "The selected record can not be displayed...
hi
for the following, shud i use a SELECT query as recordsource or a Dlookup coded into a cmdButton ?
EmpCode: ___ [Find cmdButton]
EmpName: ________
The user enters the empcode in a txtBox_1 and clicks the Find cmdButton. The snippet shud search the table (EmpMaster) for that EmpNo and...
hi..
i want the user to enter a employee code in a normal unbound textbox and search that code in the table (EmpMaster). If the record is found, display the record in the corresponding textboxes / labels (which ever is advisable).
Thanks
JB
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.