Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting row using chekbox in a tabular form

Status
Not open for further replies.

Rajesh99

Programmer
Mar 17, 2003
43
US
I want to add a check box to each row of a table. This table is a straight dump of data from a table. What I am trying to do is provide user a way to chose(print or do something else) for the row checked. How do I do this? I created a tabular object usning wizzrad and then added manually a check box in the detail band. This check box is not linked to any data etc. All it should do is allow select/deselect a row. Seems in my case all rows get selected or deselected??
 
Unbound objects can't be used properly in tabular (continuous) forms. Because they are not tied to a specific row in the table, changing one changes them all!

If you only want to select one row for processing, I do one of two things:

1. Use the OnDoubleClick event on each object in the Detail section of the form to perform an Event Procedure that does the requested action.

2. Put a command button in the Detail section. If the user presses the command button for a row, use that row's key to identify what record to act upon.


[shadeshappy] Cruising the Information Superhighway
[sub] (your mileage may vary)[/sub]
 
In addition to wemeier's advice, what is wrong with adding a boolean field to the table and clearing it after you've finished with the procedure(s) you want to invoke?

Win2000P/Acc2000 - It's best to stay with products that work.
 
How are ya Rajesh99 . . . . .

[blue]ineuw[/blue] has the direct, quick & easy solution to your problem. In fact, you could add the boolean field alot faster than the time it took you to post!

Calvin.gif
See Ya! . . . . . .
 
I rarely use access and this forum is good for such question. I am using Oracle database and link tables there. Oracle does not have a Boolean field. My real problme is to attach a virtual column in a form based on link table. The form I am working on is a typically will have check box against each row.record and I will do mass
action on such rows checked. So using a double click etc on a command button will not work. Any other clues?
 
I have the right answer for you. Use a single character field. Here is the code as to how to do it. This comes from an application where the requirement was an "X" in the field instead of a boolean value!

Private Sub VersionSpecific_Click()
If Me!VersionSpecific <> "X" Then Me!VersionSpecific = "X": Exit Sub
Me!VersionSpecific = ""
End Sub

Private Sub VersionSpecific_AfterUpdate()
If Me!VersionSpecific > "" Then Me!VersionSpecific = "X"
End Sub

Win2000P/Acc2000 - It's best to stay with products that work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top