G
Guest
I want to update the values (Budget) in a table (Budget 01) based on the
input of an input box multiplied by a percentage stored in the table
(Percentage). This is initiated when the user clicks a button from a form.
The input box pops up, but after I enter the amount (30000), I get an error:
"Microsoft Office Access can't find the field "|" referred to in your
expression"
How do I correct this?
Below is my code:
Dim strSql As String
Dim Message, Title, MyValue
Message = "What is your total budget?"
Title = "Budget" ' Set title.
' Display message, title, and default value.
MyValue = InputBox(Message, Title)
strSql = "UPDATE [Budget 01] " & _
"SET [Budget 01].Budget = " & [Budget 01]![Percentage] &
MyValue
CurrentDb.Execute strSql
input of an input box multiplied by a percentage stored in the table
(Percentage). This is initiated when the user clicks a button from a form.
The input box pops up, but after I enter the amount (30000), I get an error:
"Microsoft Office Access can't find the field "|" referred to in your
expression"
How do I correct this?
Below is my code:
Dim strSql As String
Dim Message, Title, MyValue
Message = "What is your total budget?"
Title = "Budget" ' Set title.
' Display message, title, and default value.
MyValue = InputBox(Message, Title)
strSql = "UPDATE [Budget 01] " & _
"SET [Budget 01].Budget = " & [Budget 01]![Percentage] &
MyValue
CurrentDb.Execute strSql