G
Guest
I have an access application with a SQL server back-end database. The main
form is called GCPP Modifications Entry Form. We store screen shots relating
to some modifications, however, because of the time it took to load each
record we decided to add a button that would open the screen shots subform
only when needed (to add or view existing screen shots).
Because the of the SQL server back end the primary key is not assigned when
you open a new record, only after a refresh (such as navigating to a new
record). This means that if you are entering a modification and want to add
a related screen shot, when you press the screen shot button, the foreign key
assigned to the screen shot record will be <null>.
I would like to add a line to the macro for the button that opens the screen
shot form so that the main form is refreshed when the button is pressed. The
button currently uses a macro rather than expression. I have not been able
to figure out how to do this. I tried adding a line to the macro with a
requery command... the refresh command is not available in the macro builder.
I also tried adding a "me.refresh" expression on the on-click event (perhaps
because it was trying to refresh the button rather than the form??) rather
than using a macro- again to no avail.
Any suggestions?
form is called GCPP Modifications Entry Form. We store screen shots relating
to some modifications, however, because of the time it took to load each
record we decided to add a button that would open the screen shots subform
only when needed (to add or view existing screen shots).
Because the of the SQL server back end the primary key is not assigned when
you open a new record, only after a refresh (such as navigating to a new
record). This means that if you are entering a modification and want to add
a related screen shot, when you press the screen shot button, the foreign key
assigned to the screen shot record will be <null>.
I would like to add a line to the macro for the button that opens the screen
shot form so that the main form is refreshed when the button is pressed. The
button currently uses a macro rather than expression. I have not been able
to figure out how to do this. I tried adding a line to the macro with a
requery command... the refresh command is not available in the macro builder.
I also tried adding a "me.refresh" expression on the on-click event (perhaps
because it was trying to refresh the button rather than the form??) rather
than using a macro- again to no avail.
Any suggestions?