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
 
Joined
Jun 8, 2005
Messages
5
Reaction score
0
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
 

crazylegs

Member Extraordinaire
Joined
Dec 31, 2004
Messages
5,743
Reaction score
64
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...
 
Joined
Jun 8, 2005
Messages
5
Reaction score
0
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?
 
Joined
Jun 11, 2005
Messages
28
Reaction score
1
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
 

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

Top