[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

button in table on form

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

650 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