Solved

button in table on form

Posted on 2013-06-21
3
243 Views
Last Modified: 2013-06-30
hey guys,

i have a form and on it it has a table. this table contains all the steps in a workflow a staff has to do to finish a certain activity. i would like to have a command button in each row of the table so that when the staff clicks it, it will run code to complete that task.

how can i do so? or if this is not possible is there a work around? or if not possible still is there a different way? thanks guy!! = ))
0
Comment
Question by:developingprogrammer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 150 total points
ID: 39265366
When you say a "table", what exactly do you mean? You can't embed a table in a form, although you can build a datasheet form that looks somewhat like a table.

If you have a datasheet form, then you can't add buttons to that form. You'd have to change to a continuous form, and build that to look like a datasheet (and you can then also add your button). You might also be able to use a hyperlink field to do this, but that is troublesome (at best). You're much better off switching over to a continuous form and formatting it to look like you need.

Also - are these predefined tasks? That is, you have a set of 5 (or 10, or 100) tasks, and you have predefined actions which must be taken to complete that task? If you don't, then I'm not sure how you'd write code in advance that would complete the task.
0
 
LVL 24

Accepted Solution

by:
Bitsqueezer earned 350 total points
ID: 39265841
Hi,

in one point I disagree with LSM Consulting: You can of course implement a table or a view directly into a form without creating a datasheet form, but I don't recommend to do so. That can be done by simply creating a subform and set the SourceObject property to the name of the table, that's all.

This is not recommended because you have no control over the table/view because there are no events like in a form. You can also not enable/disable a field or use Conditional Formatting and so on. So this method is only usable if you really only want to display some data without interaction by the user or if you want to display different views in one form (also only for displaying).

So the solution is to use a continous form either in datasheet view or normal continous form view. In the last case you have all formatting possibilities like adding a button and so on, in datasheet view you can only use a "fake" hyperlink: Simply display the text of a field underlined and in blue color so it looks like a hyperlink and then use the click event of the field to do something with the current line. This works in continous forms and datasheet view, but depending on the Access version you will not see the underlining and blue color in datasheet view.
Adding a button in a normal continous form view is no problem and you need not much code to make that work.

See the attachment demo database where I show all these methods.

Cheers,

Christian
ButtonTable.zip
0
 

Author Comment

by:developingprogrammer
ID: 39269223
guys superb answers and thanks so much for the help!! let me implement this and then reply yall ok? thanks so much once again guys!! = ))
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Undo Button 1 34
Save Selections in MS Access 3 31
Fast way to syncronize two MS Access tables and audit changes 4 42
Launch Outlook minimized 6 30
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question