Add character to record selector in datasheet view

G

Guest

Using Office 2003 and Windows XP;

I have a subform on a main form. The subform is in datasheet view.

Is there a way to add a character or an image to the record selector buttons
of the subform in datasheet view? That is, the square grey button at the
left-hand side that when clicked selects the entire record.

I would like to add a character, say an asterisk, based upon the value in a
column for certain records. Is this possible? I can code using VBA. If
someone would please post example VBA illustrating how to do this, it would
be most appreciated.

Thanks much in advance.
 
M

Marshall Barton

XP said:
Using Office 2003 and Windows XP;

I have a subform on a main form. The subform is in datasheet view.

Is there a way to add a character or an image to the record selector buttons
of the subform in datasheet view? That is, the square grey button at the
left-hand side that when clicked selects the entire record.

I would like to add a character, say an asterisk, based upon the value in a
column for certain records. Is this possible? I can code using VBA. If
someone would please post example VBA illustrating how to do this, it would
be most appreciated.


No, you can not affect the appearance of the record
selector.

Why not use a text box instead?
 
G

Guest

Hi,

Thanks for reply; how would I go about using a text box like that?

Is it possible to display multiple records in a similar manner as the
datasheet?

Would I be able to use a double click event to obtain the current record
selected to display other info?
 
G

Guest

I know of no way to alter the little record selector button. One could,
however, include a field in the table or query, placed at the leftmost
position in the datasheet view, that would provide the indicator you are
interested in seeing. But you would want it to be disabled for data entry
(you don't want the cursor stopping there), and you'd be generating junk data
in that field. (If you used a query to generate the field on the fly and
included the table data in the query as well, showing the query results in
the subform, I'm afraid Access might consider the whole thing non-updateable.)

Maybe it would be easier to use a continuous form to simulate the datasheet
view. The detail section of the form would be very short from top to bottom.
You can put a disabled text control at the left end of the detail section,
with the value, such as an asterisk or whatever, based on other data in the
record. It can be large and bold. (I tried this approach with success.)

Hope this helps.

Jim Beard
 
M

Marshall Barton

Set the text box's expression to something like:
=IIf(somefield = somevalue, "*", Null)
You can use the text box's Double Click event to select the
record:
DoCmd.RunCommand acCmdSelectRecord

Personally, I prefer to use a continuous subform with
Conditional Formatting (Format menu) to highlight the
current record. I either display the additional data all
the time or use a seperate button to make another subform
visible But then, I don't have any idea what look and feel
you are tryibg to achieve in your app so that may be
inappropriate in your situation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top