Using:
Windows XP SP1; Access2002 SP1;
I have a form as a datasheet where the following codes resides for every column shown, that is executed when the user doble clicks the cell.
Is it posible to put it in a module and how would I call it
in my form?
The origin form is: frmresumengastos
The destination form is: frmdetallegastosporcta
Windows XP SP1; Access2002 SP1;
I have a form as a datasheet where the following codes resides for every column shown, that is executed when the user doble clicks the cell.
Is it posible to put it in a module and how would I call it
in my form?
The origin form is: frmresumengastos
The destination form is: frmdetallegastosporcta
Code:
Private Sub Budget_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmDetalleGastosPorCta"
stLinkCriteria = "[txtCostCenter]=" & Forms!frmresumengastos.txtCostCenter _
& "And [txtDpto]=" & Forms!frmresumengastos.txtDpto
DoCmd.OpenForm stDocName
'Forms!frmDetalleGastosPorCta.Visible = False
Forms!frmdetallegastosporcta!txtAnoD = Forms!frmresumengastos.txtAnoD
Forms!frmdetallegastosporcta!txtAnoH = Forms!frmresumengastos.txtAnoH
Forms!frmdetallegastosporcta!txtMesD = Forms!frmresumengastos.txtMesD
Forms!frmdetallegastosporcta!txtMesH = Forms!frmresumengastos.txtMesH
Forms!frmdetallegastosporcta!txtGrupoCtasID = Me.GrupoCuentas_ID
Forms!frmdetallegastosporcta.Requery
If IsNull(Forms!frmdetallegastosporcta.cboGrupoCtas) = True Then
Forms!frmdetallegastosporcta.cboGrupoCtas.Value = Me.GrupoCuentas_ID.Value
End If
Forms!frmdetallegastosporcta.Visible = True
End Sub