Results 1 to 15 of 15

Thread: draw grid & box

  1. #1
    Join Date
    Aug 2004
    Location
    malaysia
    Posts
    12

    Unhappy Unanswered: draw grid & box

    Dear Sir/Madam,
    Can someone be kind enough to share me some tips to draw grid? I know it is too demanding..but i will do it by myself as long as i am guided.Thanks.

  2. #2
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    draw grid? could you explain a bit?
    ghozy.

  3. #3
    Join Date
    Aug 2004
    Location
    malaysia
    Posts
    12
    Hi ghozy,
    glad tat u replied! I want to have a form to allow me to input 2 figures (length & width) so that a gris can b plotted. For example, a big sheet of paper size is length 30" x width 8", if first figure 10" (length) is input, it will plot 3 lines across 30" (cos 30" divided by 10" equals to 3) and same goes to width. Is it clear? Thanks.

  4. #4
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    are you going to print this? or it is only for scrren view?
    ghozy.

  5. #5
    Join Date
    Aug 2004
    Location
    malaysia
    Posts
    12
    to input, to view & print.

  6. #6
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    then you can use a Report for this operation. Report object have 3 methods called Line, Circle and Pset. in On Page Event of the Report you can draw things like:
    Code:
    Me.Line(flags, x1, y1, x2, y2, color)
    Me.Circle(flags, X, Y, radius, color, start, end, aspect)
    Last edited by ghozy; 08-13-04 at 09:39. Reason: typo
    ghozy.

  7. #7
    Join Date
    Aug 2004
    Location
    malaysia
    Posts
    12
    Hi ghozy,
    Thanks for the tips. However, wat codes to be written in the form? TQ

  8. #8
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    sorry I can only show you the way to do it. I don't have time to write actual code at the moment, because I'm checking this forum at work. but your form will need 2 textboxes and 1 button. when user clicks the button it will open the report. and all calculatiing and drawing stuff will be done in the report's on page event.
    ghozy.

  9. #9
    Join Date
    Aug 2004
    Location
    malaysia
    Posts
    12
    ghozy,
    Thanks anyway. BTW, any sample of coding similar to mine available in the forum so that i can take a look? Or any websites? I also dont want to trouble you so much.

  10. #10
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    if you don't need this immediately I can write some code for you this weekend. if you need something fast, you can check this article which shows how to draw a box in to reports.
    http://www.databasejournal.com/featu...le.php/3104211
    ghozy.

  11. #11
    Join Date
    Aug 2004
    Location
    malaysia
    Posts
    12
    Hi ghozy,
    I'm so thankful that you want write the codes for me. No problem, I can wait, just do it when you are less busy. In the meatime, I'll check the link you gave. Thanks a lot.

  12. #12
    Join Date
    Aug 2004
    Location
    malaysia
    Posts
    12
    Hi ghozy,
    Since you want to help me writting some codes, I also have to do something rather than just sit & wait.Pls check my attachment for better understanding.
    Can you fine tune it so that the grid can be drawn inside the OLEBound300:? And the grid also must be plotted according to the big size & cut size, is it all right? Thanks.
    Attached Files Attached Files

  13. #13
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    that's an advanced example. I didn't know you can use regular Vb forms in Access. so I'm newbie on this subject as much as you are.

    my idea was creating a dynamic report based on values from the form. though I didn't have time to open computer this weekend at home. it was a busy one.

    one thing I noticed Access doesnt let me create 30'' report, probably because I don't have proper printer installed.
    ghozy.

  14. #14
    Join Date
    Aug 2004
    Location
    malaysia
    Posts
    12
    Truthfully,it was not written by me. I was thinking that you could fine tune here & there for me. Or do you know anyone who is able to do it? Anyway, thanks for your effort.

  15. #15
    Join Date
    Feb 2004
    Posts
    533
    Quote Originally Posted by ghozy
    that's an advanced example. I didn't know you can use regular Vb forms in Access. so I'm newbie on this subject as much as you are.
    I didn't know that either. I've used them in Excel but have never seen them in Access. I can think of many uses for vb Userforms. Check this out explains how to add a user form. You can go to customise Toolbar to get the userform button and add it to the insert menu. Check this out:

    A Different Type Of Access Form - The UserForm
    http://www.vb123.com/toolshed/03_map/userforms.htm

    seanyeap, have you thought of using an activeX control on a Form? There's the MS Office Spreadsheet object that gives a grid just like an excel sheet on a form. I'm sure this could be minipulated with VB to change size if needed.
    Last edited by savbill; 08-17-04 at 00:15.
    ~

    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •