Search results

  1. A

    Read a file and import its data into a table

    or is it because i've added one more and statement to cut out on the second else if statement
  2. A

    Read a file and import its data into a table

    Here MIRSeq is a long number, MIRType is an Alphabet, Tkt a string. I 've just copied them from unerlying elseIf Query. can't figure out the commas.
  3. A

    Read a file and import its data into a table

    trying to bring all into one Dcount If DCount("FileID", "qryMIR", "[MIRSeq]=" & MIRSeq & " and [MIRType]=""" & MIRType & """ and [TicketNumber]=""" & tkt & """")i get an error like Type Mismatch. Where is that in the code ?
  4. A

    Read a file and import its data into a table

    Ok ! If i use a query with just the tables with mirseq, mirtype and tktnumber fields, will that be helpful or should i use the select query itself ? About the A04 The A04 has the sectors, so each line represents a sector. I just need to count the number of sectors in a file. Isn't counting them...
  5. A

    Read a file and import its data into a table

    The mirseq and mirtype are in tblfiles and ticket number is in tblpax. So i guess the select statement will not work here. Need to check on the elseif state and see if i can get it check the mirseq, mirtype and tikt number at one go. About the A04 line, need to check the number of lines as...
  6. A

    Read a file and import its data into a table

    yes ! after a while of troubleshooting, seemed like it is working. i've edited code as follows to check another field too If DCount("FileID", "qryMIR", "[MIRSeq]=" & MIRSeq & " and [TicketNumber]=""" & tkt & """") Then 'validate MIR Sequence number and Ticketnumber to avoid Duplication...
  7. A

    Read a file and import its data into a table

    OK so the FileId represents each file thus each row are the contents of each file. From the spreadsheet you can see that there are files with same MIRSeq but not same file with both MIRSeq and TicketNumber the same.
  8. A

    Read a file and import its data into a table

    ok let me get you an excel sheet of that !
  9. A

    Read a file and import its data into a table

    how do i read the number for A04 lines?
  10. A

    Read a file and import its data into a table

    Ok reason to check it by a row was that in an actual MIR file a MIRseq is unique to a MIR file and thus unique to the data within. once these are in query, a file is represented by a row so to check for duplicates the ideal way is to check for a MIRSeq from the processing file and check the...
  11. A

    Read a file and import its data into a table

    So sorry about the things. :( Well yes that is what i need, i wanted to check for both but the above code, wouldn't that check the whole query ? i need to check on a row because the MIRseq resets when it reaches 65535 from 1 and there can repeating tkt numbers which is ok as it can be for...
  12. A

    Read a file and import its data into a table

    Ok so here goes Set RSqry = CurrentDb.OpenRecordset("qryMIR") If DCount("FileID", "qryMIR", "[MIRSeq]=" & MIRSeq) Then 'validate MIR Sequence number and Ticketnumber to avoid Duplication txtMIRActivity.Value = srcfile & " " & MIRSeq & " " & PNR & " " & "DUPLICATE MIR...
  13. A

    Read a file and import its data into a table

    Okie dokie. Will try that.
  14. A

    Read a file and import its data into a table

    Or can i use separate if statements instead of in one line ?
  15. A

    Read a file and import its data into a table

    Ok thanks for that info. Let me try your suggestion. Don't how to set the select query when coming to vb coding. Will give it a try tho.
  16. A

    Read a file and import its data into a table

    Lol still hanging on :) so i create a septate query with mirseq and tkt ? And dlookup into this new query ? But still i would be using the same dlookup function, rite ? Is that whatnyou meant ?
  17. A

    Read a file and import its data into a table

    hi, Been trying to do a duplicate check with the following code If DCount("FileID", "qryMIR", "[MIRSeq]=" & MIRSeq) And DCount("FileID", "qryMIR", "[TicketNumber]=""" & tkt & """") Then 'validate MIR Sequence number and Ticketnumber to avoid Duplication txtMIRActivity.Value...
  18. A

    Read a file and import its data into a table

    oh ok. thanks
  19. A

    Read a file and import its data into a table

    Figured it out :) LogF = "C:\MIR\" NewF = LogF & Rename & "MIRActivityLogg.txt" LFile = "C:\MIR\" & Date & "_" & "MIRActivityLog.txt" If LFile = "" Then Set lf = fs.CreateTextFile(LogF & Date & "_" & "MIRActivityLog.txt", True) Else Open LFile For Append As #2...
  20. A

    Read a file and import its data into a table

    Can't find the difference here. Seems both are the same.
Back
Top Bottom