T
troubledstudent
It looks like it should work, and I have painstakenly looked over it for a
long time. It runs, but the result is not what I want (checking if record
exists): The primary key is the retort id & labor code & process_name &
employee_name
dim sqlcheck as string
dim rs as dao.recordset
dim db as dao.database
set db = currentdb
sqlcheck = "SELECT distinctrow Processing.Retort_id, Processing.labor_code,
Processing.process_name, Processing.employee_name " & _
"FROM Processing WHERE (((Processing.Retort_id)=""" &
Me.retortid.Value & """) AND ((Processing.labor_code)=""" &
Me.select_labor.Value & """) AND ((Processing.process_name)=""" &
Me.select_process.Value & """) " & _
"AND ((Processing.employee_name)=""" & Me.select_employee.Value &
"""))"
'checks database for current record
Set rs = db.OpenRecordset(sqlcheck)
If (rs.BOF And rs.EOF) Then
' file is found
Else
'file is not found
end if
This is not working, any thoughts or suggestions on how to check if record
exists based off of 4 user defined values?
Thanks
long time. It runs, but the result is not what I want (checking if record
exists): The primary key is the retort id & labor code & process_name &
employee_name
dim sqlcheck as string
dim rs as dao.recordset
dim db as dao.database
set db = currentdb
sqlcheck = "SELECT distinctrow Processing.Retort_id, Processing.labor_code,
Processing.process_name, Processing.employee_name " & _
"FROM Processing WHERE (((Processing.Retort_id)=""" &
Me.retortid.Value & """) AND ((Processing.labor_code)=""" &
Me.select_labor.Value & """) AND ((Processing.process_name)=""" &
Me.select_process.Value & """) " & _
"AND ((Processing.employee_name)=""" & Me.select_employee.Value &
"""))"
'checks database for current record
Set rs = db.OpenRecordset(sqlcheck)
If (rs.BOF And rs.EOF) Then
' file is found
Else
'file is not found
end if
This is not working, any thoughts or suggestions on how to check if record
exists based off of 4 user defined values?
Thanks