I am not sure what you mean by "write mode"
If you put this code into the Load event, then presumably you are dirtying
the new record as soon as you open the form. Is this what you mean by write
mode? That the new record is dirtied, and so the user must complete the
entry or undo it before proceeding to another new or old record?
If you don't want it to do that, it would make sense to remove the code from
the Load event.
If you want to have the code anyway, yet let the user out sometimes, they
just have to press the <Esc> key twice to undo the record.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Sam" <aron.mcdermott@pearson.com> wrote in message
news:1148476564.530672.62050@i40g2000cwc.googlegro ups.com...[color=blue]
> Allen,
> Yes I was aware of that. And I used both as I want the form to open
> ready to add a new record but still be able to step back to through
> previous records. I should have explained this better the first time
> as there's more than just this code in the load event - see code below
>
> strQuery = "SELECT * FROM [Get_CSR_Profile]"
>
> Set qdfDef = CurrentDb().CreateQueryDef("", strQuery)
> Set rsRecordset = qdfDef.OpenRecordset(dbOpenDynaset)
>
> strContReason = rsRecordset!CONTINGENCY_REASON
> strSiteID = rsRecordset!SITE_ID
> strLocation = rsRecordset!LOCATION
> strCSR_Type = rsRecordset!CSR_TYPE
>
>
> If rsRecordset.RecordCount <> 0 Then
> 'Me.CONT_REASON.Value = sRecordset!CONTINGENCY_REASON
> Me.SITE_ID_Combo.Value = rsRecordset!SITE_ID
> 'Me.CUSTOM_LOCATION.Value = rsRecordset!LOCATION
> 'Me.CSR_TYPE_Combo.Value = sRecordset!CSR_TYPE
> End If
>
> The code above populates some fields on the form so the user doesn't
> have to re-enter it every time they open thier DB (they all have their
> own copy of the DB). Becuase I'm populateing these fields the form
> goes into write mode right away. The user is then not allowed to
> scroll back through previous records because there are other fields on
> the form that are required. My question is, is there anyway around
> this? Is there a way to take the form off write mode? Or any other
> way?
>
> Thanks and sorry for the confusion.
>[/color]