I'm trying asign a control on my form with a value from a query and I'm having a heck of a time trying to do so. I've been trying to put in VBA code in an event procedure.
Any suggestions?
The purpose of the control (which is a text box)is to display the last meter read on a machine. The main forms data source is the meter reads table. The value of the last read needed is from the machine table, hence the need for the query.
In the end I need to display the last read (taken from the Machines Table), the new read (entered in the form goes in the meter reads table), calculate the differance (the monthly total, which goes in the meter reads table), and finally assign the new read value to the machine tables LastRead value.
I beleive the this would best be done using VBA code. I'm a little new to Access. Do you have any suggestions how?
Also, could you tell me: I wanted to back this form on a query in the first palce, but I looked like if I did so, I wouldn't be able to save records. Is that the case with forms in general.
Instead of creating a query to do this you can code within vba to pull the max value of the recordset. I can write out the code for you but need more information on how this form is setup and what the fields are on the machine table and meter reads table.
it would be faster if you can zip the db to me.
kennethp@webmpt.com
Currently seeking for position around Boston, MA. kenphu@yahoo.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.