Subform sintaxe

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. Maybe this question is very easy to some of you...
I have a subform 'subfrm_Correspondencia' in a main form 'frm_Obras' and
they are linked by a field called 'Obra_ID'.
The subform 'subfrm_Correspondencia' is a datasheet where the users enter
values in a field called 'ID_ordem' (e.g. '1', '2', etc.).

How can I define a variable 'ordem' which is equal to the value entered in
the field 'ID_ordem' on a selected record (line) of the subform
'subfrm_Correspondencia'?

I already tried:
ordem = Forms!frm_Obras!subfrm_Correspondencia!ID_ordem
but always returned the value 0.

Can anybody help me?

Thank you in advance.

Acores
 
Try refreshing the form before initializing your variable, sometimes Access
needs a Form.Requery or Form.Recalc in order to see the value that was
typed...

otherwise try that in combination with:

ordem = Forms!frm_Obras!subfrm_Correspondencia.Form!ID_ordem
 

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

Back
Top