how to clear a form field programmatically?

  • Thread starter Thread starter Maciej Paras
  • Start date Start date
M

Maciej Paras

Hello!
My name is Maciej, and I'm from Poland... I turn to you with this question:
I created a combobox in a form. One of values availabe in this combo is
opening another subform. I want to set the value of that combo to be empty
afer opening the subform. This is the code I've written so far:

Private Sub Combo44_BeforeUpdate(Cancel As Integer)
If Combo44 = "Value I wanted" Then

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "My subform"
DoCmd.OpenForm stDocName, , , stLinkCriteria
'------ And here is the place I want the combo to be cleared from "Value I
wanted"
End If
End Sub

What is the statement of such insertion of an empty field?
Thank you, with kind regards, Maciej Paras
 
Thank you, thank you, thank you!!!
This worked excellent, but in fact I had to put the expression "Me.Combo44 =
Null" in AfterUpdate event.
Satisfied user ;-)
 
Back
Top