473,378 Members | 1,207 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Drawing/Creating Table and Table Coordinates with Access 2002 VBA

Good Day

I have records with x, y, and z values. I'm trying to create a report or form that will show a graphical representation of these locations.

There are a number of layers, these are the value x (1 through 26). y and z are the axis for the table with each axis having 5 slots (so 26 of these 5X5 tables, one for each value of x).

I'm trying to have it so these tables get drawn, then based on the x, y and z values, color the resulting cell black, leaving the rest white. I've seen some Access Battleship games around and have been trying to find the code to see if I can get some inspiration for this task.

I'm really quite stumped. Anyone have any ideas, hints or suggestions?
Sep 2 '15 #1
4 1124
jforbes
1,107 Expert 1GB
A lot of how you implement this will depend on how your data/table(s) is/are laid out. An easy way to knock this out is to
  • have a single record with all twenty five (5x5) elements as separate fields, either Boolean or Integers.
  • Then you could arrange the twenty-five fields on a Form in a grid and bind them to their corresponding Field in the Table.
  • Then setup Conditional Formatting on the twenty-five fields where if it is one value the background would be black, and white if it is the other value.
Then all you would have to do is Load the Form and Filter to the record you would like to show and then Access would do all the heavy lifting for you.
Sep 2 '15 #2
Unfortunately it's multiple records. I'm looking at iterating through them to get the values. That being said, I'd completely forgotten about Conditional Formatting. Thanks!
Sep 2 '15 #3
jforbes
1,107 Expert 1GB
You could still use Conditional Formatting. Just use Unbound Controls and set their values through VBA and an OpenRecordSet.

Or if you are opening a RecordeSet in VBA, you can set the BackColor yourself.

If you get stuck while creating the code, post it and we will try to help you out.
Sep 3 '15 #4
Rabbit
12,516 Expert Mod 8TB
How do you plan on representing a three dimensional object? As far as I'm aware, Access doesn't support transparency so you can't layer your objects in an x,y,z plane and have them be visible if there's something in "front" of it.
Sep 3 '15 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: DChrist | last post by:
I am unable to update a table (either by opening it and entering data directly or through a form). I have set the recordsettype property to updateable snapshot and have set the permissions to...
2
by: Kevin | last post by:
Hi All, I am new to MS SQL Server.I am using MS SQL 2000.I have a problem in creating a table by using Select command.I have table called "test" and i want to create another table with the same...
3
by: Serious_Practitioner | last post by:
Hello, all - I would like to produce Avery labels, #5931, from a database I've built for a client. I can't seem to find this Avery number in the list of labels that pops up when one uses the...
41
by: Ruby Tuesday | last post by:
Hi, I was wondering if expert can give me some lite to convert my word table into access database. Note: within each cell of my word table(s), some has multi-line data in it. In addition, there...
3
by: mar10 | last post by:
I am creating a database in Access 2002 for a small firm that would like security on the tables. They want some employees to have write access only to tables, while others read-only. I have not...
1
by: Boris | last post by:
All, Please help me with following error. I am using classic ASP to connect to MS Access DB to create a table dynamically. Following is the table definition. I get the error when I execute the...
1
by: | last post by:
I am new to ADO.NET and C#. I can't seem to figure out how to duplicate the structure of an existing table in Access into another table in the same DB. Is there any easy way? Thanks in...
1
by: learning_codes | last post by:
Hi , I'm wondering if there is a way for me to export some tables including data and structure from old database to a new database and then save as new database name. I try to create a marco...
0
by: Sebastian | last post by:
Hello I develop my applications in Access 2002. My development system is running Windows XP SP2 and I have Microsoft Office XP Developer. Microsoft Office XP is at SP3. I used Inno Setup (great...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.