Is it possible to draw to the screen using VBA and a form in Access and if so, could someone either point me to a decent tutorial on the subject, a good book containing the subject, or show me some example code for drawing objects such as lines and circles to the screen?
7 10333
I know that years ago I did this on a report while on the fly no need to go to design view but for a form things like that become more difficult... I just googled and didn't see anything. Good luck hopefully one of the other posters can help you out.
I googled the issue and also, to my chagrin, yahoo!ed the issue. I found alot on doing this in excel, but none of those seemed to apply to Access functions. Here is what I am trying to do. I have a series of map pages. As it is, when someone adds information to the database about one of the maps, they type in the information, print it out, highlight the affected area, then scan it back in an associate the information with the entered data. (This is many levels of annoying).
What I would like to do is store just the base maps and have perhaps a line and rectangle tool to allow them to mark the affected area. That way they mark the affected area on the screen, then enter the information. The information would then be stored in the database along with a semi-colon delimited memo of the coordinates of the shapes over the affected areas.
At this point, I am thinking I will have to take this problem to VC++.NET to solve it, but if possible I'd prefer to do it in access due to my employers desire to use Access only for this project.
If you just need rectangles and lines you can have a hidden rectangle and line object and then they can type size and coordinate info into textboxes that will resize and move the rectangle/line around on the screen
O.K. first when storing images in an MS Access database you are looking at a large baloon effect. For instance an image that may only be 100k will expand your DB by about 10mb due to the wonderfull world of OLE. Remember MS Access has a 2 gig limit once you hit this limit you are lucky if you can recover it.
That said I found an article which may do what you are requesting.
Using the InkPicture control: http://msdn2.microsoft.com/en-us/library/aa480682.aspx
Good luck let me know if you need more help or how it turns out.
I googled the issue and also, to my chagrin, yahoo!ed the issue. I found alot on doing this in excel, but none of those seemed to apply to Access functions. Here is what I am trying to do. I have a series of map pages. As it is, when someone adds information to the database about one of the maps, they type in the information, print it out, highlight the affected area, then scan it back in an associate the information with the entered data. (This is many levels of annoying).
What I would like to do is store just the base maps and have perhaps a line and rectangle tool to allow them to mark the affected area. That way they mark the affected area on the screen, then enter the information. The information would then be stored in the database along with a semi-colon delimited memo of the coordinates of the shapes over the affected areas.
At this point, I am thinking I will have to take this problem to VC++.NET to solve it, but if possible I'd prefer to do it in access due to my employers desire to use Access only for this project.
__1. Create an OLE Object Field in your Primary Table called [Maps]. __2. Link/Embed Map Images *.BMPs into this Field as appriopriate. __3. Create a Form and set the Control Source of the Map Field to this OLE Object Field that was created. __4. By dbl-clicking on the Map Images within the Form, the User can activate the OLE Server that the *.bmp opens in, and the User man modify it and save it.
4. By dbl-clicking on the Map Images within the Form, the User can activate the OLE Server that the *.bmp opens in, and the User man modify it and save it.
Forgot about that and if I am not mistaken you can even edit it in MS Access too. I tried this but it has been so long I would need to research it or dig up my old db.
Thanks everyone for replying.
Rabbit: I can't use a hidden rectangle because there needs to be the ability to add as many rectangles as the user needs to the page (if they need 5, then they need 5, et cetera). Thank you for the suggestion, however.
Denburt: I know that images will balloon the database. The images are actually just linked into the database via a image objects .picture property. In other words, I don't store the images in the database, just the information about them and, if I can draw the objects to screen that I need, information about those objects. The database is currently 500kb (with a folder with 200MB worth of maps in the same folder as it). Thank you for the warning though, as before I started studying for this database, I was in fact going to load them in. I found a way to do this without ballooning but it required more time than I was willing to put into it.)
The InkPicture control might work, I will give it a try monday morning when I get into work. Thanks for the link (It will help with more than just this project and, considering I am making this database for a group of individuals with tablets, might be just what I was looking for). I will let you know if it works.
ADezii: The individuals that will be working on this are for the most part the antithesis of technically savvy. Editing the base files would be more than they are willing to do. Not only that, but the reason I am attempting to draw rectangles and lines to screen is to save space by not creating many many images (Right now one map page may have 10-15 files with the same file but different information on it, adding up to 15MB worth of GIF per map page). This is not an option as BMPs will balloon the size of the folder (There is only so much server space we are allowed to use). Thank you for the suggestion, however.
All: I think I am going to just code this on my copy of Visual Studio and make it an independent program that links to an access database with the data in it, as the limitations of working with the Access Forms is starting to waste alot of my time and effort to figure out how to do what should be relatively simple things. Thank you everyone for your suggestions, and I will decide what to do when I get into work on Monday (I will also update this post if I find out anything new or find that the InkPicture control works for what I need).
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Matt |
last post by:
I am writing a recursive program to draw the lines recursively, given the
range and number of intervals (n) between the range.
The problem is I don't know how to draw the line in point 0.375, as...
|
by: Florida Draw |
last post by:
------=_NextPart_000_0012_1D5428A2.65C196F8
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
Sign-up for the FREE Holiday Giveaway Draw
You must register to be eligible for the draw....
|
by: Matt |
last post by:
I am writing a recursive program to draw the lines recursively, given the
range and number of intervals (n) between the range.
The problem is I don't know how to draw the line in point 0.375, as...
|
by: Colin McGuire |
last post by:
Hi there. I have written a small procedure to draw various shapes on
things. A bit of it is shown below.
Private Sub drawShape(ByVal shapeType As Integer, ByRef g As Graphics)
Select Case...
|
by: dan heskett |
last post by:
I am owner-drawing a listbox, in an attempt to create a nice list with some
custom "fields" and text layout.
Essentially it works, but I must be missing something big, conceptually,
because I...
|
by: zxo102 |
last post by:
Hi everyone,
I have tried two days to figure out how to draw the image in
wx.BufferedDC on the page created by AddPage of wx.Notebook but still
got no clue.
The attached example works fine. If...
|
by: Daniel Mark |
last post by:
Hello all:
I am looking the sample code posted on PIL website
http://www.pythonware.com/library/pil/handbook/imagedraw.htm
################################################
<<Draw a Grey Cross...
|
by: Jeff Waskiewicz |
last post by:
Hello All,
I'm trying to solve a nagging problem. The goal is to draw a rectangle over
the top of all the other controls on a form. Specifically, over a ChartFX
control. The user would draw...
|
by: zhaow |
last post by:
Hi, All
Greetings!
I want to develop as appllication that requires a line-drawing function
in the blank area between two forms. I have looked up the MSDN, it says that
a graphics object need a...
|
by: Arben |
last post by:
Can anyone halp me to write the Java code for thid exercise?
--------------------------------------------------------------------------------------------------------------
Exercise: Use the class...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |