question

negin1313

New member
Local time
Yesterday, 18:43
Joined
Dec 8, 2012
Messages
4
when we design one form for specific table then how can we have uniqe style for each exite record or new record
ex: i wrote this for one of my check box when the user selected this check box the second row will appear(its work but when new record added it,s style apply to the others records)


Private Sub Check1829_Click()
If Check1829 = -1 Then
Text1831 = "Approved"
ChangeReason1.Enabled = False

Else
Me.AllowEdits = True
ChangeReason1.Enabled = True

Text1831 = "Disapproved"
End If
End Sub

Private Sub Check1920_Click()
If Check1920 = -1 Then
Text1922 = "Approved"
ChangeReason2.Enabled = False

Else
Me.AllowEdits = True
ChangeReason2.Enabled = True

Text1922 = "Disapproved"
End If
End Sub
 
Welcome Aboard:)
1. For your own sanity and the sake of any programmer who must pick up where you leave off, give your controls meaningful names. You won't know next week what Check1829 or Text1831 or Text1922, etc. are if you even know today without looking at what they are bound to.
2. Continus forms and datasheet forms are a single form that is displayed multiple times each with a different record. The problem is that Access maintains only a single set of properties for all visible instances of the form. So if you make the text red in the third record, all visible records will turn red because that property applies to all visible instances.
3. In some cases you can use conditional formatting which will apply to only one record at a time but it is limited.
 

Users who are viewing this thread

Back
Top Bottom