G
Guido_042
Guest
I need a displayed image on a form to change based on related number-field value
I am trying to design a small Access database to create Bingo-style game sheets for a product we have developed.
I need to place an OLE control (or picture control) onto a form that will display one of eight small BMP images depending on the numerical value of a corresponding numerical field stored in a table.
See, the bingo-style game sheets have 6 rows of eight pictures per sheet, and there are 1000 sheets. Each row in the entire set must be unique. We accomplished this with an Excel spreadsheet with eight columns of random numbers 1-8 in each cell, times 6000 rows. Each row was assigned a sheet number (1-1000) as well as a row number (1-6). This was imported into Access and scanned for duplicate rows (based only on the game fields, not the sheet/row identifiers) to ensure uniqueness.
Next, a table was created containing 1000 rows, each row matching a sheet number (1-1000) with a "control number" (say, 12001-13000, to be printed on the sheet and used for later winner validation). A form was created based on this control numbers table, containing a text box for the control number up in the corner, and then the graphics for the column headers and row headers were placed across the top and down the left side.
Within the resulting "game area", a repeating subform was created by joining the control number table to the game-values table linked via the sheet number field. On the subform, 8 OLE controls were placed in a single row, one for each of the 8 game-values in each row.
In the same folder as the .mdb file, 8 .bmp files are located, each representing the 8 unique game symbols. What I want to be able to do is program the 8 OLE controls to look at the underlying 8 numerical game values, and then display the appropriate BMP image (1.bmp for value 1, 2.bmp for value 2, etc.). The subform will then repeat 6 times per sheet (once for each row in the game values table with the matching sheet value), and the form will show a grid of unique combinations of the 8 bmp images per sheet.
We can then create unique series's of our game simply by creating a new grid of numerical values. Also, different customers want different images, so we can easily change the 8 bmp files to create a unique look for each customer.
My problem? I don't know how to make those OLE controls swith based on the numerical value. I'm not even sure exactly how to "link" OLEfield1 to game-value field 1, etc.
Obviously, I am limited by my abilities in Access. I don't know any VBA, and I've just learned all this as I go along.
I am trying to design a small Access database to create Bingo-style game sheets for a product we have developed.
I need to place an OLE control (or picture control) onto a form that will display one of eight small BMP images depending on the numerical value of a corresponding numerical field stored in a table.
See, the bingo-style game sheets have 6 rows of eight pictures per sheet, and there are 1000 sheets. Each row in the entire set must be unique. We accomplished this with an Excel spreadsheet with eight columns of random numbers 1-8 in each cell, times 6000 rows. Each row was assigned a sheet number (1-1000) as well as a row number (1-6). This was imported into Access and scanned for duplicate rows (based only on the game fields, not the sheet/row identifiers) to ensure uniqueness.
Next, a table was created containing 1000 rows, each row matching a sheet number (1-1000) with a "control number" (say, 12001-13000, to be printed on the sheet and used for later winner validation). A form was created based on this control numbers table, containing a text box for the control number up in the corner, and then the graphics for the column headers and row headers were placed across the top and down the left side.
Within the resulting "game area", a repeating subform was created by joining the control number table to the game-values table linked via the sheet number field. On the subform, 8 OLE controls were placed in a single row, one for each of the 8 game-values in each row.
In the same folder as the .mdb file, 8 .bmp files are located, each representing the 8 unique game symbols. What I want to be able to do is program the 8 OLE controls to look at the underlying 8 numerical game values, and then display the appropriate BMP image (1.bmp for value 1, 2.bmp for value 2, etc.). The subform will then repeat 6 times per sheet (once for each row in the game values table with the matching sheet value), and the form will show a grid of unique combinations of the 8 bmp images per sheet.
We can then create unique series's of our game simply by creating a new grid of numerical values. Also, different customers want different images, so we can easily change the 8 bmp files to create a unique look for each customer.
My problem? I don't know how to make those OLE controls swith based on the numerical value. I'm not even sure exactly how to "link" OLEfield1 to game-value field 1, etc.
Obviously, I am limited by my abilities in Access. I don't know any VBA, and I've just learned all this as I go along.
Last edited: