First off thanks for the help John,
The Enter and Exit events compute a running total for the
total on order quantity of a part. We could order 50lbs
of a paint one day and 150lbs the next. The on enter will
subtract the current PO's on order from the total on
order. The Exit event will add the PO on order to the
total.
I do have two combo boxes, one in the form and one in the
subform. Both have over a thousand options. Is a list
box faster or what other option is there? The record
source for the main form is a table. The Link master and
Child properties are set to the PO# which is primary key
in tbl_purchase_order_header and is also a field in
tbl_purchase_order_detail. There is a relationship set in
the Tools->Relationships.
Thanks again,
Josh
-----Original Message-----
Josh-
You don't say what it is you're trying to do in the Enter
and Exit events.
Are you trying to do some validation before the row is
saved? If that's the
case, then you should be using the form's BeforeUpdate
event - and NOT using
macros. If the user tries to move to another record on
the outer form,
Access will try to save the dirty row in the subform -
and fire the
BeforeUpdate event to give you a chance to look at it.
You can set Cancel =
True if you don't want the record saved.
As for a slow-loading form, there could be lots of
causes. Are you using
combo boxes with thousands of rows in the Row Source? Do
you have the Link
Master and Link Child properties of the subform control
set properly? What
is the Record Source of the outer form (the SQL)? The
subform? Do these
queries open slowly when you open them from the Database
Window?
--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
I have a form 'Purchase Header' and a subform 'Purchase
Detail'. The subform has a text box 'units ordered' with
an on entry and on exit macros attached. If the user
leaves the focus in the 'units ordered' text box but
uses
the navigation buttons in the 'Purchase Header' form,the
on exit macro does not run. Is there a way to disable
form record changes when the focus on still in the
subform?
Also, this form opens slowely. I know that I can set
the
form to only open a blank record but is there a way to
open the record in edit mode but only load a single
record
at a time for quicker loading?
Thanks
.