ReQuery on a Form Question

ReQuery on a Form Question

am 01.02.2008 17:57:22 von Susan Bricker

Hi. I have a form that opens at a 'newrecord' (blank controls ... just
waiting to be filled in). The form does have a RecordSource Query
(background informaton for you).

On the form I have a button (btnBrowse) that I want to be used to get
out of 'Add or NewRecord' mode and "goto the First Record in the
recordset".

So ... in the btnBrowse_Click routine I put ...

Me.Requery

However, after this step I don't seem to have any records in the
recordset because when the logic "goes to the first record" there is no
first record. Tracing and stopping after the Requery of the form shows
the following:

?me.recordsetclone.recordcount = 0
?me.recordsetclone.eof = true
?me.recordsetclone.bof = true
?me.currentrecord = 1
?me.newrecord=true = true
?me.recordsource = SELECT tblPeople.peopleID, tblPeople.fname,
tblPeople.midinit, tblPeople.lname, tblPeople.suffix, tblPeople.addr1,
tblPeople.addr2, tblPeople.city, tblPeople.state, tblPeople.country,
tblPeople.zipcode, tblPeople.phone, tblPeople.altperson,
tblPeople.event_contact, tblPeople.event_secretary, tblPeople.trial_rep,
tblPeople.email, tblJudges.judgeID, tblJudges.n_qualdt,
tblJudges.o_qualdt, tblJudges.u_qualdt, tblJudges.n_licdt,
tblJudges.o_licdt, tblJudges.u_licdt FROM tblPeople LEFT JOIN tblJudges
ON tblPeople.peopleID=tblJudges.peopleID ORDER BY tblPeople.lname;

Any idea how to get this form to Requery so that I may display the
records and get out of the NewRecord "mode"?

Thank you.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***

Re: ReQuery on a Form Question

am 01.02.2008 21:07:20 von Rich P

Hi Susan,

Just a suggestion here - For primary data (which would be associated
with corresponding Detail data) I would enter the primary data directly
into the Primary table rather than go through a query. A query
recordsource is more for lookups-data display/filtering. Detail data
should be entered into a temp table (temporary storage) where you can
tweak it to your heart's content and then submit it to the main Detail
storage table(s) when the detail data is correct.

This way there is no need to requery your primary data form. Just use
the navigation buttons at the bottom of the form to go to the first
record.

Rich


*** Sent via Developersdex http://www.developersdex.com ***