newbie.. simple question..

  • Thread starter Thread starter marco_pb via AccessMonster.com
  • Start date Start date
M

marco_pb via AccessMonster.com

help please..
i'm trying to get value from textbox. I don't know the parameter
can anybody help? thanks...

Dim a As Single
a = Forms![form name].[field name].Value
If (a = "example") Then
Forms![form name].[other field name].Visible = True
Else
Forms![form name].[other field name].Visible = False
 
Try the following:

Dim a As Single
a = Forms![form name]![field name]
If (a = "example") Then
Forms![form name]![other field name].Visible = True
Else
Forms![form name]![other field name].Visible = False
End If

You should:
1) Use ! instead of . when accessing indexed values in a collection e.g.
Forms![form name]![other field name].Visible = True NOT
Forms![form name].[other field name].Visible = True
2) Make sure you end an If-block with the End If statement.

"marco_pb via AccessMonster.com" schreef:
 
Dirk said:
Try the following:

Dim a As Single
a = Forms![form name]![field name]
If (a = "example") Then
Forms![form name]![other field name].Visible = True
Else
Forms![form name]![other field name].Visible = False
End If

You should:
1) Use ! instead of . when accessing indexed values in a collection e.g.
Forms![form name]![other field name].Visible = True NOT
Forms![form name].[other field name].Visible = True
2) Make sure you end an If-block with the End If statement.

"marco_pb via AccessMonster.com" schreef:
help please..
i'm trying to get value from textbox. I don't know the parameter
[quoted text clipped - 6 lines]
Else
Forms![form name].[other field name].Visible = False

thank you before for answering.. I have tried it out, but still not working.
I previously did
a = Forms![form name].[field name].value to get data that is integer and it worked

I dont know how to get a string value >.<
thanks again ^^
 
Oh yeah sorry, you also need to change:

Dim a As Single

to

Dim a As String

"marco_pb via AccessMonster.com" schreef:
Dirk said:
Try the following:

Dim a As Single
a = Forms![form name]![field name]
If (a = "example") Then
Forms![form name]![other field name].Visible = True
Else
Forms![form name]![other field name].Visible = False
End If

You should:
1) Use ! instead of . when accessing indexed values in a collection e.g.
Forms![form name]![other field name].Visible = True NOT
Forms![form name].[other field name].Visible = True
2) Make sure you end an If-block with the End If statement.

"marco_pb via AccessMonster.com" schreef:
help please..
i'm trying to get value from textbox. I don't know the parameter
[quoted text clipped - 6 lines]
Else
Forms![form name].[other field name].Visible = False

thank you before for answering.. I have tried it out, but still not working.
I previously did
a = Forms![form name].[field name].value to get data that is integer and it worked

I dont know how to get a string value >.<
thanks again ^^
 
thanks a lot ^^
It is that simple.... how stupid i am..
thank you very much..
 
Back
Top