×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Formatting Each Record in a Subform Separately

Formatting Each Record in a Subform Separately

Formatting Each Record in a Subform Separately

(OP)
I want to run some code on each record of a continuous subform.  What I am looking for is something similar to the 'on format' in the detail section of a report.  I want to adjust some buttons' text colors based on some code that I run.  The code uses a field that is on each record in the subform.  The buttons are also located on the subform.  So when you view the subform, there are two buttons for each record.  I tried using the 'on current', but it changed every record on the form to the same thing, based on which record you clicked in.  Maybe I'm trying to do something that isn't possible!!!  However, I've found that many things that I thought were impossible can be solved by people in this forum.

Mike Rohde
rohdem@marshallengines.com

RE: Formatting Each Record in a Subform Separately

Something that is pssible is creating a function
in a module

this is called like so
=FunctionName([Somefield])   'Note this can be used in a report or a form or a query.

Now depending on what you pass to the function it could return whatever.

You use VBA to do any number of things in the function.
But it can get slow if it does a lot or if you have lots of records.

Think of it like a balck box you pust something in and it works on it a returns something back.
Note you can pass as many paramters in as you like.  But it can only return one value back.


DougP, MCP
 dposton@universal1.com
 
 Ask me how Bar-codes can help you be more productive.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close