disgracept
Member
- Local time
- Today, 11:14
- Joined
- Jan 27, 2020
- Messages
- 45
Hi all!
I'm having a problem that i really can't figure out why it happens (my bad of course...)
I'm making a database to manage properties and there i have a form to search the properties, like this:
The list of properties is a continuous subform that has the address, the view button and some hidden textboxes with the elements of the address i use to compose the full address. One of these textboxes is the property ID field. The recordsource of this subform is a query.
The view button has this code:
But when i click in the buttons the target form opens always in the first record and not in the current one for that particular button...
I've tried to use the full path to the subform, instead of
But still doesn't work, gives the same result!
What am i doing wrong? How do i access in buttons code the current record info?
Thanks for your help!
Carlos
I'm having a problem that i really can't figure out why it happens (my bad of course...)
I'm making a database to manage properties and there i have a form to search the properties, like this:
The list of properties is a continuous subform that has the address, the view button and some hidden textboxes with the elements of the address i use to compose the full address. One of these textboxes is the property ID field. The recordsource of this subform is a query.
The view button has this code:
Code:
Private Sub img_VerImovel_Click()
DoCmd.OpenForm "frm_VerImovel", acNormal, , "Imovel_ID = " & Me.txt_ImovelID
End Sub
But when i click in the buttons the target form opens always in the first record and not in the current one for that particular button...
I've tried to use the full path to the subform, instead of
Me.(...)
, like this:
Code:
Private Sub img_VerImovel_Click()
DoCmd.OpenForm "frm_VerImovel", acNormal, , "Imovel_ID = " & [Forms]![frm_pesquisaImoveis]![frm_ResultadosSimples].[Form].txt_ImovelID
End Sub
But still doesn't work, gives the same result!
What am i doing wrong? How do i access in buttons code the current record info?
Thanks for your help!
Carlos
Last edited: