Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Posts
    2

    Access 2003 - Creating Buttons from a Table

    Is there a way to create command buttons or create an image(s) from the contents of a table?
    For example. I have a table called tdlAreas and when the form opens I want it to create a command button for each record in tblAreas using record data to locate it in the correct position on the screen (X-Y coords that are stored in table)



    Table fields are id,name,x_coord,y_coord
    The name will contain the button caption, the coords are the location on the screen of the button. I will also have to add an onClick that will make all the buttons run the same function only with different parameter (name) being sent to the function.

    Thanks

  2. #2
    Join Date
    Feb 2009
    Posts
    7
    It's pretty complicated. It takes about 100 lines of code.
    You have to be able to understand recordsets, CreateControl, Module.CreateEventProc, Module.InsertLines

    A much simpler way would be to create a continuous form from tblArea then you can have all your buttons in a column

  3. #3
    Join Date
    Feb 2009
    Posts
    2
    I did some research on the CreateControl from your post and I think that might help me out some. I thought about the continuous form but I want everything in one view. tblArea should have very few records and the only reason I'm wanting to code it this way is increase the versatility of the final program, by just having to enter a table record instead of having to program in a new button. I'm new to access and would rather program this in php/mysql but the forces that be really like access so I guess its time to learn. It's a hard convertion going from php/mysql to Access thankfully I have programmed some in visual basic.

    Thanks for the advice and any other code snippets on doing this would be greatly appreciated.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Creating 2003 mde from 2007
    By essaytee in forum Access
    Replies: 2
    Last Post: 12-01-2009, 08:37 AM
  2. converting from Access 2003 to Access 2007
    By LawrenceLau in forum Access
    Replies: 6
    Last Post: 11-20-2008, 03:53 PM
  3. Replies: 1
    Last Post: 09-06-2006, 11:48 AM
  4. Replies: 2
    Last Post: 04-11-2006, 08:40 AM
  5. Help! Newbie needs help with Access 2003!!!
    By infernojericho in forum Access
    Replies: 0
    Last Post: 12-03-2005, 08:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums