|
-
Mar 27th, 2006, 11:21 AM
#1
Frenzied Member
Re: Access - Changing control property on one record but not all records
I couldn't get it to work for a continuous view (not saying it can't be done, just that I didn't get it), but did get it for Single record view. Code like this in the Form_Current event:
VB Code:
Private Sub Form_Current()
If [txtFoo] = "B" Then
[txtFoo].BackColor = vbBlue
Else
[txtFoo].BackColor = vbWhite
End If
End Sub
You'd have to alter it some for a combobox, but that's the idea. If you have to have a continuous form, I don't know without more research.
Tengo mas preguntas que contestas
-
Mar 27th, 2006, 09:40 PM
#2
Thread Starter
Addicted Member
Re: Access - Changing control property on one record but not all records
Thanks again for the post, I really appreciate you trying to help me. Using single form is an option, but I really need continuous view. I'll keep trying and let you know if i figure something out.
-
Mar 28th, 2006, 03:11 PM
#3
Thread Starter
Addicted Member
Re: Access - Changing control property on one record but not all records
So I tried a version of your code, Salvelinus and it worked except that as soon as i clicked on a new record, the control's backcolor went back to the color it was before. I'm pretty sure that is because it was in the Form_Current event. Is there a way to save the properties of the control after they are changed in the Form_Current event procedure?
-
Mar 29th, 2006, 09:50 AM
#4
Frenzied Member
Re: Access - Changing control property on one record but not all records
Ok, may have found what you want. Check here for conditional formatting.
Tengo mas preguntas que contestas
-
Mar 31st, 2006, 10:47 AM
#5
Thread Starter
Addicted Member
Re: Access - Changing control property on one record but not all records
Perfect!! That was EXACTLY what I was looking for. Man, there is a wealth of info in that sample program. Thanks again for all your help, it has been much appreciated!
-
Apr 4th, 2006, 08:22 AM
#6
Thread Starter
Addicted Member
Re: Access - Changing control property on one record but not all records
I have a textbox that I use as the background for each of my records. Does anyone know how to completely disable the textbox control so that it can't be clicked and therefore in focus? I have the properties of the textbox set to .enabled = false and .locked = true, but I can still click on the textbox which then covers up all the other controls in the record. Anyone?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|