G
Guest
I originally posted this message on another forum to no avail, so I'm now
trying my luck here. I have a 2 Append Queries. The first query inserts a
Master record and the second query inserts detail records. I have a button
click event which fires the code below which runs both queries. The problem
is that if I click the button once I only get the Master Query to work, and
in order to get the Detail Query to work I need to click the button a 2nd
time. Therefore in order to properly execute both queries as shown below I
must always click the button twice. Any ideas why this is happening? Thanks!
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryConvertPOToCM" 'Insert MASTER record
DoCmd.OpenQuery "qryConvertPOToCMDetail" 'Insert DETAIL records
DoCmd.SetWarnings True
trying my luck here. I have a 2 Append Queries. The first query inserts a
Master record and the second query inserts detail records. I have a button
click event which fires the code below which runs both queries. The problem
is that if I click the button once I only get the Master Query to work, and
in order to get the Detail Query to work I need to click the button a 2nd
time. Therefore in order to properly execute both queries as shown below I
must always click the button twice. Any ideas why this is happening? Thanks!
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryConvertPOToCM" 'Insert MASTER record
DoCmd.OpenQuery "qryConvertPOToCMDetail" 'Insert DETAIL records
DoCmd.SetWarnings True