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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format current record on cont. sform when moving to another sform?

Status
Not open for further replies.

geralf

Technical User
Apr 7, 2003
44
MX
Hi,

In my continous form (sub form as datasheet) I have a field which when receives focus, jumps to another subform where data can be entered. This works great, but I'd like to get the row in the first SF, to be displayed in another color. This to indicate which record in SF1, data is being entered in SF2. The SF1 acts as a Parent for SF2. SF1 and SF2 has a 1 to many relationship.

Is this possible to do?

I've tried the Conditional Formatting (A2k), but it looses it's color when focus is moved to SF2.

Any thoughts/ideas are most welcome. Thanks!

Gerhard
 
Strictly speaking it is not possible to use conditional formatting on a continuous form BUT, there is a workround!
By putting a field (or a number of fields) in the background of the subform and setting the fields with a BLOCK font which can be set to different colours dependant upon the condition being met.
I'm sure if you look in FAQ you will get a full description if not then email me and I will send you a sample.


Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Frank J Hill,

Thanks for your reply. I have A2k, and I'm using conditional formatting of a subform in another app I've developed. This one works fine, so I don't understand when you say 'You cant, strictly speaking, but...'. I came to think of a way to do this, but I'll have to test it first. If it works, I'll post my solutuon for those who would be interested. Thanks for your reply and offer to send me a sample db. I'll get back.

Gerhard
 
Hi, I forgot about this thread, but what I did is quite simple really.

I placed a boolean field in the form, and depending upon if it was true or false, changed the color of the fields I wanted by using Access' conditional formatting. The only 'tricky' thing is to set the boolean value at the appropriate events, like when going back to the subform, the users could only return by using a button, so I could be certain of the focus was returned to the same field it left from.


Gerhard
 
well done. any chance you can send me a sample db?
i'm interested to learn from what you've managed to accomplish, if its not too much trouble for you.

ryan.temporary@cox.net

i understand how you used the boolean i think, as I'm very familiar with conditional formatting but, I'm interested at how you go about jumping between subforms recognizing the what record you were on.

like i said, if its not too much trouble.
 
Yes, of course I can. I have to find it, and modify it, so I get rid of all the top secret stuff :). I'll need a day or two, because I have too much going on right now. Hope that will do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top