Access Access Macro - this should be simple, right?

Joined
Jun 8, 2005
Messages
5
Reaction score
0
I'm completely lost... I don't understand the logic of Access.

What I want to do is update a value in a form when another value is changed.

What I have now is:
"Value" - onChange - run macro "25Procent"

This macro does:
SetValue
Item: [Forms]![Tarife]![Value25]
Expression: [Forms]![Tarife]![Value]*1,25

But I always get an error. When I run it in the macro window it reads 'Out of string space' (what does this mean???) ... when I run it in the form window -- it errors as well.

What am I doing wrong? Both values have the same format (euro) --- both have Control Source's from the database (resp. Value and Value25) ... that shouldn't matter, right?

any help is appreciated!
Jazz
 
the strange thing is that I'm not connecting to two databases. There is only one database... and the form is only connected to one table.

What about the other problem? Any suggestions?

Jazz
 
The only other thing i have seen on the knowledge base is that this error occurs when the machine runs out of memory (ram), maybe check your machines specifications...


Other than that I'm out of Idea's...
 
I see.

What about the update macro... is there anything wrong with it? It seems very simple to me, not something that would **** up my computer, right?
 
jazztie said:
I'm completely lost... I don't understand the logic of Access.

What I want to do is update a value in a form when another value is changed.

What I have now is:
"Value" - onChange - run macro "25Procent"

This macro does:
SetValue
Item: [Forms]![Tarife]![Value25]
Expression: [Forms]![Tarife]![Value]*1,25

But I always get an error. When I run it in the macro window it reads 'Out of string space' (what does this mean???) ... when I run it in the form window -- it errors as well.

What am I doing wrong? Both values have the same format (euro) --- both have Control Source's from the database (resp. Value and Value25) ... that shouldn't matter, right?

any help is appreciated!
Jazz


Jazz,

Why a macro :confused:
Why don’t you use VBA, it’s easier and quicker than macro’s.
The problem with macro's is the use of them. I always use VBA instead of macros. VBA are more flexible than macro’s.

The problem in your Macro is that you used an field with the name value[Forms]![Tarife]![Value]*1,25 -> Value is a propertie of Access objects. You must changed the field name Value to example myValue



Here is a example in VBA (I hope that Value25 is a checkBox)

Private Sub Value25_click()
REM
REM -- This the Click event of the Checkbox
REM


If Value25 then
myValue.Value = myValue.Value * 1,25
End If

End Sub
 
Back
Top