Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    timmy is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    62

    Make command buttons unique to a record

    Hello access forumers,



    Im having trouble with a form, it seems really simple but i just cant work it out, ill explain a bit about my form and then what im trying to achieve:

    my form contains information about a client (address, name, workorders, notes, machines)
    Now the name and address appear at the top, then i have a tabbed section below for workorders, notes and machines. Workorders is a subform, notes is a textbox and machines; a command button linking to that machine.

    Now the problem im having is, the command buttons are carrying over to other clients (records). However the notes are not (and of course, the subform for workorders). I have spent so long staring at the command buttons properties and other settings and cant find anything.

    Is there any way to make my command buttons only appear on certain records (i need different buttons on each record). If it's not, what are my options?

    Thanks a lot for your time and help .

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    It would help if you could post a picture of your form so we can see what you are talking about; maybe even the db if that is not too inconvenient.

  3. #3
    timmy is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    62
    No problem, not at the office computer at the mo, ill post it once im in (bout 45 mins).

    Hope the thread doesn't die in the meantime....

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    It is 12:30 in the morning here so I may toddle off to bed in a bit but will check back in when I get up.

  5. #5
    timmy is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    62
    i attached a screenshot, its the command button that has "mpc2800 AD / 1022". basically thats the machine model, i added that one for a client but when i move to another record, it is still there.

    Im not sure if it makes this more complicated, but i need that "add or delete machines button" to carry over, but not the machine ones. if this isn't do-able i don't mind, ill just enter new machines into the table manually (ive got to add a button for each one anyway, im pretty sure theres no way to make a button create another button, if you see what i mean.)

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Why don't you have a SubForm on that tab that lists all of the machines? You would then not need the Add/Delete machine button since you could do it on each record of the SubForm.

  7. #7
    timmy is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    62
    if you mean have a subform with a table listing the machines, i would need to filter the machines to be able to just show machines for that client, with the amount of clients and machines thats a lot of work. Also, i need to be able to create a report, listing some readings from the machines.

    Im not too great with subforms, ive only created one so far and that just pulls data from another table and displays it in a subform.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Don't you already have a table with client machines listed?

  9. #9
    timmy is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    62
    i do yes, would you suggest adding a field in the machines table for the company and then make a subform to grab that clients machines?

    if i do it this way, how would i create a report? The reason i was using buttons was to make it user-friendly to create a report, which actually grabs data from another table, the data is filtered based on what button was pressed.

    Sorry if these seem like very basic questions, i just couldnt figure it out. Your help is very appreciated .

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Quote Originally Posted by timmy View Post
    i do yes, would you suggest adding a field in the machines table for the company...
    How do you know what machine(s) a company has?

  11. #11
    timmy is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    62
    Thats what im adding now. I wanted to be able to select the client on the form i screenshotted, click the machines tab and see a list of that clients machines, when you click on the machines button, it creates a report with readings for that machine (from another table).

    I've had a little play with the subform and managed to create one that displays the machines in a table form for that clients. Now if i place a button to create the report on this subform, will that carry over to other records too?

    edit: Sorry, i didnt explain myself properly there, how will i create a button (or something else) to create a report for the machine you want (how will i select the machine and how will i create the report, basically.).

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Let's have another picture, please.

  13. #13
    timmy is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    62
    There ya go, i included the navigation bar, thought it might give you a better idea of whats going on in there .

    Also, that subform is really ugly, is it possible to show it in form view, rather than datasheet / table view?

    I hope you understand what im trying to do, im not the best at explaining things .

    edit: i should try before i ask... i changed the view of the subform. sorry. new screeny in form view.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Good. Now instead of using a Datasheet view, create a form that is in Continuous Form mode and has a command button for deleting. This botton will then display in the SubForm on each record.

  15. #15
    timmy is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    62
    that looks excellent, thanks a lot.

    Now what im gonna do is create a button to view the report with a filter of the serial number from the subform.

    Any pointers you can give me before i start fiddling with this next obstacle? (isnt learning access fun?!)

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Command buttons to Open Forms
    By Ace Pioneer in forum Access
    Replies: 1
    Last Post: 11-30-2010, 06:32 AM
  2. command buttons
    By nashr1928 in forum Forms
    Replies: 23
    Last Post: 10-15-2010, 04:09 PM
  3. Command buttons
    By maintt in forum Forms
    Replies: 3
    Last Post: 08-03-2010, 09:52 AM
  4. Moving Command Buttons
    By Pete Cope in forum Forms
    Replies: 0
    Last Post: 03-23-2010, 03:21 PM
  5. Access 2007 Command Buttons
    By fgerald in forum Access
    Replies: 2
    Last Post: 03-05-2010, 07:09 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