I use this code to close the name Frm_AutoSaleReceipt when I click the button on the other page. But it error like the image.
For Each fua As Form In Application.OpenForms
If fua.Name = "Frm_AutoSaleReceipt" Then
fua.Close()
End If
Next
I use this code to close the name Frm_AutoSaleReceipt when I click the button on the other page. But it error like the image.
For Each fua As Form In Application.OpenForms
If fua.Name = "Frm_AutoSaleReceipt" Then
fua.Close()
End If
Next
Without loop all open forms you can find that in this way: