D
DataDiva via AccessMonster.com
Hello All,
I am building a Quality db in Access 07 for my work and would appreciate any
help that someone would be willing to offer so I can figure this out. My
experience in Access is limited to basic college courses and working out
problems through the use of these forums.
TblMain
Today's_Date - Date/Time
Job_Number - Text (PK)
Customer - Text
Assembly_Number - Text
RoHS - Text
REV - Text
Order_Qty -Number
Order_Status - Text
ID
TblMain has a 1 to Many relationship to tblDepartments
TblDepartments
Today's_Date - Date/Time
Department - Text
Job_Number Text
Customer - Text
Serial_Number - Text (PK)
Assembly_Number - Text
RoHS - Text
Inspector_ID - Text
Previous Operator - Text
Job_Function - Text
Process - Text
Qty-Assembled - Number
Defects_Present - Text
I created a query from TblMain which includes Job_Number, Customer, Assembly,
RoHS.
What I would like to do is have users scan the job_Number into an unbound
textbox, hit a Find Record button and have it populate these four fields on
the form. The record source for FrmDepartments is TblDepartments. Currently
the redundant fields are bound to both tables and I'm not sure if I should
just display that info on FrmDepartments or save them to the table.
TblMain/FrmMain will only be used for the originator of the job to put the
initial record in.
So far I have an unbound text in frmDepartments and a command button with
this code in the On Click event:
Private Sub cmdJobLookup_Click()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("Qry", dbOpenDynaset)
With rst
.FindLast "[Job_Number]=""& Me.JobNumber&"""
Me.JobNumber = !Job_Number
Me.Assembly_Number = !Assembly_Number
Me.Customer = !Customer
Me.My_RoHS = !ROhs
..Close
End With
Set rst = Nothing
End Sub
This is only populating the fields with the first record in the query. I need
it to look up the job number that the user will type in the textbox. Hope I
have been clear enough. I am open to any and all suggestions!
Thank you
CBH
I am building a Quality db in Access 07 for my work and would appreciate any
help that someone would be willing to offer so I can figure this out. My
experience in Access is limited to basic college courses and working out
problems through the use of these forums.
TblMain
Today's_Date - Date/Time
Job_Number - Text (PK)
Customer - Text
Assembly_Number - Text
RoHS - Text
REV - Text
Order_Qty -Number
Order_Status - Text
ID
TblMain has a 1 to Many relationship to tblDepartments
TblDepartments
Today's_Date - Date/Time
Department - Text
Job_Number Text
Customer - Text
Serial_Number - Text (PK)
Assembly_Number - Text
RoHS - Text
Inspector_ID - Text
Previous Operator - Text
Job_Function - Text
Process - Text
Qty-Assembled - Number
Defects_Present - Text
I created a query from TblMain which includes Job_Number, Customer, Assembly,
RoHS.
What I would like to do is have users scan the job_Number into an unbound
textbox, hit a Find Record button and have it populate these four fields on
the form. The record source for FrmDepartments is TblDepartments. Currently
the redundant fields are bound to both tables and I'm not sure if I should
just display that info on FrmDepartments or save them to the table.
TblMain/FrmMain will only be used for the originator of the job to put the
initial record in.
So far I have an unbound text in frmDepartments and a command button with
this code in the On Click event:
Private Sub cmdJobLookup_Click()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("Qry", dbOpenDynaset)
With rst
.FindLast "[Job_Number]=""& Me.JobNumber&"""
Me.JobNumber = !Job_Number
Me.Assembly_Number = !Assembly_Number
Me.Customer = !Customer
Me.My_RoHS = !ROhs
..Close
End With
Set rst = Nothing
End Sub
This is only populating the fields with the first record in the query. I need
it to look up the job number that the user will type in the textbox. Hope I
have been clear enough. I am open to any and all suggestions!
Thank you
CBH