unbound textboxes do not update(change) in preview mode

G

Guest

hi,
i have a dataentry access form which is also used to show data. it have some
unbound textboxes as well which shows calculated fields based on data in
db.the problem is when user clicks on "print".now if the user clicks on next
record button only the values in bound textboxes are updated(changed).The
values in unboundtextboxes (on which i have shown sum of two fields) is not
updated.
the reason is that i am putting the sum in "oncurrent" event of the form
which is not called in preview mode.
so what should i do??
thanks in advance..
 
G

Guest

Hi

Where are you getting the data for the unbound (calculated) fields from ?

Are they really "unbound" or based on a query. By unbound I mean are the
calculation done on the form or in a query

--
Wayne
Manchester, England.
Enjoy whatever it is you do
Scusate,ma il mio Inglese fa schiffo :)
Percio se non ci siamo capiti, mi mandate un
messagio e provero di spiegarmi meglio.
 
G

Guest

yes exactly...the unbound columns are getting values from some
calculations(sum of fields in two columns). and i am doing this by using
dcount and dsum vba functions
 
G

Guest

Hi Sorry about but I'm a little confused

If the field are "unbound" they will not recieve the data from anywhere
other than the form itslef. In this case any calculated result will be done
each time the form is refreshed/open/etc.

If they are based on a result of a calculation from 2 column in the base
query they will hold that information and they are not really unbound. In
this case they will not refresh with the form.

You say the calculation (for the text boxes that you want to refresh with
the fom) are taken from 2 column - where are the column - on the form itslef
(in the case you can call a refresh event) or are they in the query

Sorry to be so confused. Basically where are you getting the data (that is
held in the unbound text boxes) from?


--
Wayne
Manchester, England.
Enjoy whatever it is you do
Scusate,ma il mio Inglese fa schiffo :)
Percio se non ci siamo capiti, mi mandate un
messagio e provero di spiegarmi meglio.
 
G

Guest

need not to sorry...i must be less expressive...
basically my data is present in the access tables. i am using "dsum"
function to get the sum of the 2columns(present in the table).
then i am using "oncurrent" event of the form in which i am populating the
unbound textbox with the result returned by "dsum".
Every time the user clicks on "nextrecord" button the "dsum function"
populates the textbox.
 
G

Guest

Is there a reason why you are using DSum ?

Why not just bring in the 2 fields into the form and add these in the
unbound field

=nz([field1])+nz([field2])

I always look for the simplest method - and this seems to be it in this case.


--
Wayne
Manchester, England.
Enjoy whatever it is you do
Scusate,ma il mio Inglese fa schiffo :)
Percio se non ci siamo capiti, mi mandate un
messagio e provero di spiegarmi meglio.
 

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

Similar Threads


Top