robbie_1234
Registered User.
- Local time
- Yesterday, 20:46
- Joined
- Jul 17, 2011
- Messages
- 13
I have designed a simple access form for a paper/pencil survey with help from this forum.
I have so far been able to design the form so that certain areas of the form are invisible and the tab jumps appropriately to the next question if the respondent is a (1) youth without comments or (11) youth with comments or (2) an adult with no comments or (22) adult adult with comments (22).
However, I am having trouble jumping through an "adult only" sections of the form when the respondent is a (1) youth without comments or (11) youth with comments.
As I am not very familiar with VBA, I am have trouble writing the code. I have tried the following code in the last "youth question", which of course did not work:
If "numAGE" = 1 Then DoCmd.GoToControl "numK01LIK"
If "numAGE" = 11 Then DoCmd.GoToControl "numK01LIK"
If "numAGE" = 2 Then DoCmd.GoToControl "txtMC01"
If "numAGE" = 22 Then DoCmd.GoToControl "txtMC01"
What am I missing with my "if then statements" that returns a 'VBA error "13"?
'
I have so far been able to design the form so that certain areas of the form are invisible and the tab jumps appropriately to the next question if the respondent is a (1) youth without comments or (11) youth with comments or (2) an adult with no comments or (22) adult adult with comments (22).
However, I am having trouble jumping through an "adult only" sections of the form when the respondent is a (1) youth without comments or (11) youth with comments.
As I am not very familiar with VBA, I am have trouble writing the code. I have tried the following code in the last "youth question", which of course did not work:
If "numAGE" = 1 Then DoCmd.GoToControl "numK01LIK"
If "numAGE" = 11 Then DoCmd.GoToControl "numK01LIK"
If "numAGE" = 2 Then DoCmd.GoToControl "txtMC01"
If "numAGE" = 22 Then DoCmd.GoToControl "txtMC01"
What am I missing with my "if then statements" that returns a 'VBA error "13"?
