S
StefanThorn
Hello,
I have read through the add in this discussion form but I could not find a
sollution yet. So here is my problem. Some names are in dutch but I will try
to explain with englisch and the dutch word between ( ) behind it.
In a form ([Forms]![Hoofdformulier]![Tester]) I have a field Number A
(Nummer) and a subform ([Testgeval Subform]). In this subform I have two
fields:
1. Name (TestgevalNaam); that is only visible but not enabled and not
locked for a user.
2. Number (Vlgnr); this is a combobox field that the user wil change.
In the field Name I want to enter automaticly a name that is a combination
of the field Number A and the value of the field Number(Vlgnr).
I want to use SetValue in a macro in the On Change event and i filled in:
Item:
[Forms]![Hoofdformulier]![Tester].[Form]![Testgeval
Subform].[Form]![TestgevalNaam]
Expression:
=[Forms]![Hoofdformulier]![Tester].[Form]![Nummer] & "-" &
[Forms]![Hoofdformulier]![Tester].[Form]![Testgeval Subform].[Form]![Vlgnr]
When I change the value in the combobox it runs the macro but then i get the
message:
The expression you entered contains invalid syntax.
You may have entered an operand without an operator
followed by a window 'Action failed' and in the field arguments is see follow:
[Forms]![Hoofdformulier]![Tester].[Form]![Testgeval
Subform].[Form]![TestgevalNaam], 92B-13-1
Firts part should be the field Name(TestgevalNaam), second part is the
result of the combination of the expression that I want.
Now explained all, I can not find what is wrong so I hope someone can help
me with this or give me an other direction to go.
Thank u very much.
Stefan Thorn
I have read through the add in this discussion form but I could not find a
sollution yet. So here is my problem. Some names are in dutch but I will try
to explain with englisch and the dutch word between ( ) behind it.
In a form ([Forms]![Hoofdformulier]![Tester]) I have a field Number A
(Nummer) and a subform ([Testgeval Subform]). In this subform I have two
fields:
1. Name (TestgevalNaam); that is only visible but not enabled and not
locked for a user.
2. Number (Vlgnr); this is a combobox field that the user wil change.
In the field Name I want to enter automaticly a name that is a combination
of the field Number A and the value of the field Number(Vlgnr).
I want to use SetValue in a macro in the On Change event and i filled in:
Item:
[Forms]![Hoofdformulier]![Tester].[Form]![Testgeval
Subform].[Form]![TestgevalNaam]
Expression:
=[Forms]![Hoofdformulier]![Tester].[Form]![Nummer] & "-" &
[Forms]![Hoofdformulier]![Tester].[Form]![Testgeval Subform].[Form]![Vlgnr]
When I change the value in the combobox it runs the macro but then i get the
message:
The expression you entered contains invalid syntax.
You may have entered an operand without an operator
followed by a window 'Action failed' and in the field arguments is see follow:
[Forms]![Hoofdformulier]![Tester].[Form]![Testgeval
Subform].[Form]![TestgevalNaam], 92B-13-1
Firts part should be the field Name(TestgevalNaam), second part is the
result of the combination of the expression that I want.
Now explained all, I can not find what is wrong so I hope someone can help
me with this or give me an other direction to go.
Thank u very much.
Stefan Thorn