Retrieving Value From Subform Only Works In Break Mode

P

PeteCresswell

The code
-------------------------------------------------------------
2550 With Me.subSecurity.Form
2551 If Me.subTrades.Enabled = True Then
2552 Me.subTrades.Form!txtParTotal.Requery
2553 curParTotal = Me.subTrades.Form!txtParTotal.Value
'MsgBox curParTotal
2554 !txtParTotal.Value = curParTotal
2555 !txtParTotal.Requery
2556 End If
2559 End With
-------------------------------------------------------------

If I put a break on line 2552 or any line above it, the value
gets retrieved and everything works a-ok.

But with a break on line 2553 or no break at all, it's as if
Me.subTrades.Form!txtParTotal.Value = 0.

Anybody been here?
 
P

Pieter Wijnen

one more thing
why don't you just use the subforms control as the controlsource of the main
form?
ie = Form!subTrades!Form!txtParTotal

Pieter
 
P

(PeteCresswell)

Per Pieter Wijnen:
one more thing
why don't you just use the subforms control as the controlsource of the main
form?
ie = Form!subTrades!Form!txtParTotal

Doesn't seem to work either.

In the end, I wimped out and just wrote a Private function within
the form to retrieve the total by banging some SQL up against the
local work table where the detail lines live. Doesn't seem to
take any appreciable amount of clock time so I guess I'll just
leave it at that.
 
P

Pieter Wijnen

not seeing your app, I'm sorry I couldn't be of more help
doing what you did end up with, heck I've had to do that, and I'm glad you
learnt howto
To all your punters out there, we're only doing our best, when we have time
to spare

Pieter
 

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