True and False statement

Imranis

Registered User.
Local time
Today, 20:56
Joined
Sep 11, 2000
Messages
26
Hi,
In a form, the value of any field may determine if the other
field will be true or false. For example in my form, inventory,
if value in code is equal to 2 then the Field Table will be automatically false.
thanks.
 
In a form, the value of any field may determine if the other field will be true or false.
This is a very wrong setup for your database.
If "other field" can be calculate then you have no more need this field.
 
thanks for reply. Actually I have many entries in a form
and wish to make some fields status as false when the first
entry does not correspond to it.
If me code =3,
the Chair= False,
otherwise true
This is a simple command, but it is not working because
I do not know if Sub command will involve whole form or only
the particular field. thanks.
 
It is difficult to offer advice/suggestions to such a vague question. As Mihail has said - the structure seems strange. Can you give us an overview of WHAT the database is about? Also can you give an example of your True/False set up details.
It is a good practice to get your tables and relationships established to support your "business" before getting too involved with Forms.
Good luck with your project.
 
thanks for reply. Basically i wished to have the following
code workable:
Private Sub Form_Load()
If Me.typeppt = "Manual" Then
Me.bookletno.Visible = False
Else
Me.bookletno.Visible = True
End If
End Sub
thanks
 
Have you tried moving it to Form_Current ?



Me.bookletno.Visible = Not Me.typeppt = "Manual"
 
Last edited:
Thanks for reply. Actually I wish to set the tab pattern that if
input in pptno is manual then the field bookletno may be
inactive and so on. thanks.
 
I am working on a Form, which has many fields. Among them there is one
field which contains only two values "Manual" or "auto". I wish that whenever
I type the value Manual in this field, the tab order should not touch the other field (the name is booklet) but if it is "auto", then the tab position should be on booklet field.
thanks.
 
I'm still not 100% sure I entirely 'get' what you are trying to acheive but if the field you want it to go would normally be the next tab stop, and you just want to stop it from going there, and move on to the next field instead, then you could just disable the control?

Me.bookletno.enabled= Me.typeppt = "Auto"

You could do this on Form_current and possibly on the afterupdate of typeppt?

If you want to make sure that the next place they go is 'bookletno' if they select auto, then you could change it to

if me.typeppt="auto" then
Me.bookletno.enabled=true
Me.bookletno.setfocus
else me.bookletno.enabled=false
end if
 
You could do this on Form_current and possibly on the afterupdate of typeppt?
Can you please type the exact words, how they should
be typed in code. thanks
 
Something like

Code:
Private Sub Typeppt_AfterUpdate()

    If Me.typeppt = "auto" Then
        Me.bookletno.Enabled = True
        Me.bookletno.SetFocus
    Else: Me.bookletno.Enabled = False
    End If

End Sub

and

Code:
Private Sub Form_Current()
    
    Me.bookletno.Enabled = Me.typeppt = "auto"
 
End Sub
 

Users who are viewing this thread

Back
Top Bottom