G
Guest
I am trying to close a subform within a mainform so I can extract datat to
SAS and send it back to repopulate the table with new data. I need the syntax
to close the subform. Here is what I am using to close teh main form
tname = [Form_main].RecordSource
'MsgBox [Form_main].RecordSource
[Form_main].RecordSource = ""
DoCmd.Close acTable, tname
'MsgBox "Table closed"
and this for the subform
t1name = [subform_sub].RecordSource
'MsgBox [subform_sub].RecordSource
[subform_sub].RecordSource = ""
DoCmd.Close acTable, t1name
'MsgBox "Table closed"
The object "subform_sub" is not recognized. I need to close all forms to
export back to Access from SAS. I have a mainform with several subforms
reading 3 tables and one query. I need to close all to "reload the data".
Thanks!!
SAS and send it back to repopulate the table with new data. I need the syntax
to close the subform. Here is what I am using to close teh main form
tname = [Form_main].RecordSource
'MsgBox [Form_main].RecordSource
[Form_main].RecordSource = ""
DoCmd.Close acTable, tname
'MsgBox "Table closed"
and this for the subform
t1name = [subform_sub].RecordSource
'MsgBox [subform_sub].RecordSource
[subform_sub].RecordSource = ""
DoCmd.Close acTable, t1name
'MsgBox "Table closed"
The object "subform_sub" is not recognized. I need to close all forms to
export back to Access from SAS. I have a mainform with several subforms
reading 3 tables and one query. I need to close all to "reload the data".
Thanks!!