Help with opening form

  • Thread starter Thread starter sww32
  • Start date Start date
S

sww32

Guest
Help!!!

I am new to access and data bases

I have a table "Body shop " with fields making up Primary key

Shift can be days,lates or nights
Date Short date
Line integer 1 or 2

Given the 3 fields as strings Strshift, Strdate and StrLine
I cannot open a form at correct record, here is what i have tried

Set recset = db.OpenRecordset("Body Shop")
recset.Index = "PrimaryKey"
recset.Seek "=", Strdate, StrShift, StrLine
DoCmd.OpenForm FormName, , , , acFormEdit, acWindowNormal
recset.Close
db.Close
Set recset = Nothing
Set db = Nothing

Thanks
 
What happens to your code does it error if so what is the error if no error then does it open the first record or last, i think we need a bit more information please.

Alastair
 
Hi

it does not error it just opens at the first record

thanks
 
At the record where :-

Field Date = Strdate
Shift = Strshift
Line = Strline

I was trying to use the .seek method to find th record then open the form at that point.

Thanks
 

Users who are viewing this thread

Back
Top Bottom