G
Guest
I have an open form with two diagrams which need to be updated automatically
as new data is imported. Both diagrams 'diff_gnl_old' and 'diff_gnl_new' are
drawing their data from tables which are already imported by another module
which is activated by a command button. I am trying to use another command
button to activate a module which will rename the current 'diff_gnl_new'
diagram to 'diff_gnl_old', and then use a newly imported table to generate a
new 'diff_gnl_new'. I'm trying to do this renaming using the 'DoCmd' object,
but my knowledge of VBA in Access and its syntax is rather shocking. This is
what I have so far:
Private Sub Befehl70_Click()
On Error GoTo Err_Befehl70_Click
DoCmd.Rename diff_gnl_old, acDiagram, diff_gnl_new
Exit_Befehl70_Click:
Exit Sub
Err_Befehl70_Click:
MsgBox Err.Description
Resume Exit_Befehl70_Click
End Sub
Is it possible to simply rename 'new' to 'old', import the table, and attach
this data to the 'new' diagram, preserving all the settings that were
originally there??
Any help appreciated
Mike M
as new data is imported. Both diagrams 'diff_gnl_old' and 'diff_gnl_new' are
drawing their data from tables which are already imported by another module
which is activated by a command button. I am trying to use another command
button to activate a module which will rename the current 'diff_gnl_new'
diagram to 'diff_gnl_old', and then use a newly imported table to generate a
new 'diff_gnl_new'. I'm trying to do this renaming using the 'DoCmd' object,
but my knowledge of VBA in Access and its syntax is rather shocking. This is
what I have so far:
Private Sub Befehl70_Click()
On Error GoTo Err_Befehl70_Click
DoCmd.Rename diff_gnl_old, acDiagram, diff_gnl_new
Exit_Befehl70_Click:
Exit Sub
Err_Befehl70_Click:
MsgBox Err.Description
Resume Exit_Befehl70_Click
End Sub
Is it possible to simply rename 'new' to 'old', import the table, and attach
this data to the 'new' diagram, preserving all the settings that were
originally there??
Any help appreciated
Mike M