Force continuous from to commit/save record

A

Alex

Hi,

Background Explained:
I've got a quite complex set of 12 tabbed sub-forms on 1
master form for data entry of about 600 variables from
questionnaires, many of which are with variable records
number many-to-1 relationships.
I have some VB code which checks if all the data on any
specific sub-form is 'logical' (ie more detailed check
than Required or not). This involves VB calling another
form and presenting several named choices (as a variable
number of CheckBoxes, named specifically to that
questionnaire) the output is then saved in comma-separated
format into a text field.

I can post the VB if you ask, but I think it won't be very
clear and is at least 100 lines...

Problem:
I need Access to commit the record to the table before the
VB tries to analyse the info to produce the named
Checkboxes;

I have already tried:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70
DoCmd.RunCommand acCmdSave

'Open Form12bSharedGroups to change appropriate details
'stLinkCriteria = "GroupLocnID = " & Me![GroupLocnRef]
stDocName = "FormQn9aCattleDiseaseChoice"
DoCmd.OpenForm stDocName, , , stLinkCriteria

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70
DoCmd.RunCommand acCmdSave

'Populate Form with current details
PopulateForm9a

The function 'PopulateForm9a' analyses the comma-delimited
text that may already be in the target textbox, but this
keep coming up with 'Recordset has 0 records'; hence
there's no textbox to send the target data to.
This is because the target textbox is in a new record
which needs to be comitted/saved before I can update it,
but the 2 methods I've tried don't seem to work until the
Records actually loses focus.

Are there some parameters I'm missing to force Access to
save the record in VB code, in the middle of the VB script
before continuing to do the analysis of data in the
textboxes?

Thanks in advance - I know you hate complex brain-bending
questions.

Alex
 

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