I have an access query to record equipment casualty reports. There are initial dates and correct dates. I need to compute the number of days from initial date to today if the report is active, or compute the number of days from initial date to correct date if the report is closed. Below is my...
I have a find duplicate query that found duplicate records in my Parts table. I wrote VBA code to run the query qryDuplicateParts when I opened my form PartsListing. Is there a way in VBA to delete the duplicate records? Could I have created VBA code to find and delete the duplicate records?
Referencing a recordset in dlookup
How do you reference a recordset within dlookup?
Here is my line
asReturn = Mid(DLookup("doc_num_cd", "Parts_A"), 2, 5)
I've already set the recordset
Set rs = CurrentDb.OpenRecordset("SELECT * FROM Parts_A")
No there are no "Parts B" or "Parts C" tables. "Parts A" is a modification of the "Parts" table.
I tried the brackets and locked the database. Are you suggesting changing the table name to "Parts_A"?
My loop code is stuck. It only returns the first record. What am I missing?
:banghead:
Dim rs As DAO.Recordset
Dim asReturn As String
Set rs = CurrentDb.OpenRecordset("SELECT * FROM Parts A")
'rs.MoveFirst
If Not (rs.EOF) = True Then
rs.MoveFirst
Do Until rs.EOF
asReturn =...
I have document numbers in a table named "Parts". The filed named "doc_num_cd" consists of the following format: AUUUUU-DDDD-SSSS
AUUUUU is the code that identifies who is ordering the part (identification code)
DDDD is the Julian date
SSSS is the serial number
I want to DLookup only the UUUUU...