Saving a record - bound forms

R

Rolls

I have a main form with several combo box lookup fields and two subforms
plus other textboxes to build a record. Midway through entering data
there's a place where a query may be run to see if various combinations of
the data being entered into the current record already exist. Also a report
fronts containing data being keyed in. This produces error messages. When
the user moves off the current record (saving it) and returns the queries
run without error messages. Is there a way to save a record by means of an
event that could be triggered midway through? After this point data entered
into remaining fields would update the saved record instead of being added
later when the current record is saved. I'm looking for something similar
to DoCmd.AddRecord , , acNewRec.

Or is there a point where the architecture has to be upgraded to unbound
forms using recordsets and have I passed it?
 
T

tina

you can save the current record in a form at any time, as long as any
Required field(s) contain data. you don't say *how* you're running the
"midpoint" query - clicking a button, entering data in a specific control on
the form, etc - but at that point you should be able to save the record
before running the query. in VBA, add

Me.Dirty = False

before the code that runs the query. if you're using a macro instead, take a
look at the available macro actions; there's a Save command in there
somewhere, if i recall correctly - again, run the save before running the
query.

hth
 
J

John W. Vinson

How I'm running the mid-point query - cmd button runs a report based on a
query.

Please post the code from the command button's Click event, and the SQL of the
query.

You're at your computer. you can see it. We cannot.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top