Requery

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

I have a F_Main with TabCtl1 and TabCtl2:
TabCtl1 has txtDataResult to show us the age.
Ex: 6 years old

In TabCtl2 I have a txtWeight to write weight but only if txtDataResult in
TabCtl1 >6

For another words:

If [Forms]![F_Main]![TabCtl1]![txtDataResult]>6 Then
txtWeight.Enable = True
Else
txtWeight.Enable = False
End if

How to do this, please?
Thanks in advance.
an
 
Sorry.

In adition:
TabCtl1 has a SubF1 with txtDataResult
TabCtl2 has a SubF2 with txtWeight
Thanks.
an
 
Thanks for reply.

Sorry but I haven't any code in txtDataResult's AfterUpdate event because I
have:

txtDataResult = Age(DtBorn)
in another textbox: txtDtBorn (where I write the born's date)

an


Jeff Boyce said:
Add your code to the txtDataResult's AfterUpdate event.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

an said:
Hi!

I have a F_Main with TabCtl1 and TabCtl2:
TabCtl1 has txtDataResult to show us the age.
Ex: 6 years old

In TabCtl2 I have a txtWeight to write weight but only if txtDataResult in
TabCtl1 >6

For another words:

If [Forms]![F_Main]![TabCtl1]![txtDataResult]>6 Then
txtWeight.Enable = True
Else
txtWeight.Enable = False
End if

How to do this, please?
Thanks in advance.
an
 
Then

Private Sub txtDtBorn_AfterUpdate()
txtWeight.Enabled = Age(Nz(Me.DtBorn.Value,0)) >6
End sub

Also in Form_Current

Private Sub Form_Current()
If Not Me.NewRecord Then 'Not strictly neccessary due to use of Nz, but ..
Call txtDtBorn_AfterUpdate()
End If
End Sub

HTH

Pieter

an said:
Thanks for reply.

Sorry but I haven't any code in txtDataResult's AfterUpdate event because
I
have:

txtDataResult = Age(DtBorn)
in another textbox: txtDtBorn (where I write the born's date)

an


Jeff Boyce said:
Add your code to the txtDataResult's AfterUpdate event.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

an said:
Hi!

I have a F_Main with TabCtl1 and TabCtl2:
TabCtl1 has txtDataResult to show us the age.
Ex: 6 years old

In TabCtl2 I have a txtWeight to write weight but only if txtDataResult
in
TabCtl1 >6

For another words:

If [Forms]![F_Main]![TabCtl1]![txtDataResult]>6 Then
txtWeight.Enable = True
Else
txtWeight.Enable = False
End if

How to do this, please?
Thanks in advance.
an
 
Ok PW,

Thank you for your suggestion.
an

Pieter Wijnen said:
Then

Private Sub txtDtBorn_AfterUpdate()
txtWeight.Enabled = Age(Nz(Me.DtBorn.Value,0)) >6
End sub

Also in Form_Current

Private Sub Form_Current()
If Not Me.NewRecord Then 'Not strictly neccessary due to use of Nz, but ..
Call txtDtBorn_AfterUpdate()
End If
End Sub

HTH

Pieter

an said:
Thanks for reply.

Sorry but I haven't any code in txtDataResult's AfterUpdate event because
I
have:

txtDataResult = Age(DtBorn)
in another textbox: txtDtBorn (where I write the born's date)

an


Jeff Boyce said:
Add your code to the txtDataResult's AfterUpdate event.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Hi!

I have a F_Main with TabCtl1 and TabCtl2:
TabCtl1 has txtDataResult to show us the age.
Ex: 6 years old

In TabCtl2 I have a txtWeight to write weight but only if txtDataResult
in
TabCtl1 >6

For another words:

If [Forms]![F_Main]![TabCtl1]![txtDataResult]>6 Then
txtWeight.Enable = True
Else
txtWeight.Enable = False
End if

How to do this, please?
Thanks in advance.
an
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top