C
CB
Hi all,
I’m doing some database modification after being away from Access (and the
calibration database I created) for over six years. I’m looking at what I’ve
done and asking myself “How on earth did I do that???†Needless to say, I’m
forgetting an awful lot so please bear with me.
I’m trying to program a command button such that it will open an Excel
workbook to a specific spreadsheet depending on the equipment and serial
number displayed on the form. (This is only a temporary work around until I
get a chance to set this up in the database but we need something for the ISO
audit coming up.)
A little background…
The button is to be on main form whose record source is a query. The main
form displays the query results of equipment make and the serial number. When
scrolling through the records displayed on the main form, the sub-form will
display the associated calibration records for each piece of equipment
(record source is a table).
My goal …
When the user scrolls through and stops at the record for the “Fluke 45
DMMâ€, “serial number 123456â€, then clicks the “Get verifications†button, the
workbook will open to the spreadsheet for serial number 123456. If the user
then stops at “Fluke 179 DMMâ€, “serial number 98765â€, then clicks the button,
the workbook will open to the spreadsheet for serial number 98765. And so on.
I haven’t been able to get a macro to work and am thinking I must use code.
I did find code somewhere on this newsgroup to open a given spreadsheet but
now I need to modify it such that the particular sheet that opens is directly
related to the equipment make and serial number displayed on the main form.
Would I need to use a Select Case or perhaps incorporate the query that is
the record source for the main form? Am I biting off more than I can chew at
this time?
Thanks for any and all help!
Chris
I’m doing some database modification after being away from Access (and the
calibration database I created) for over six years. I’m looking at what I’ve
done and asking myself “How on earth did I do that???†Needless to say, I’m
forgetting an awful lot so please bear with me.
I’m trying to program a command button such that it will open an Excel
workbook to a specific spreadsheet depending on the equipment and serial
number displayed on the form. (This is only a temporary work around until I
get a chance to set this up in the database but we need something for the ISO
audit coming up.)
A little background…
The button is to be on main form whose record source is a query. The main
form displays the query results of equipment make and the serial number. When
scrolling through the records displayed on the main form, the sub-form will
display the associated calibration records for each piece of equipment
(record source is a table).
My goal …
When the user scrolls through and stops at the record for the “Fluke 45
DMMâ€, “serial number 123456â€, then clicks the “Get verifications†button, the
workbook will open to the spreadsheet for serial number 123456. If the user
then stops at “Fluke 179 DMMâ€, “serial number 98765â€, then clicks the button,
the workbook will open to the spreadsheet for serial number 98765. And so on.
I haven’t been able to get a macro to work and am thinking I must use code.
I did find code somewhere on this newsgroup to open a given spreadsheet but
now I need to modify it such that the particular sheet that opens is directly
related to the equipment make and serial number displayed on the main form.
Would I need to use a Select Case or perhaps incorporate the query that is
the record source for the main form? Am I biting off more than I can chew at
this time?
Thanks for any and all help!
Chris