?
Solved

button in table on form

Posted on 2013-06-21
3
Medium Priority
?
246 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 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 600 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 1400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

741 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