I have a main form that displays an image of one person. Based on that I am clicking a button that will take me to another form. The other form I am doing something else and when done:
I want to go back to the first form and run the load event again (note: the first form was left open when going to the second form).
How to do that?
Code:
Dim rs2 As Recordset
If (thecounterAll = 6) Then
DoCmd.OpenQuery "reset UserChoice"
thecounterAll = 1
Set rs2 = CurrentDb.OpenRecordset("randomUser")
Me.theuserid.Value = rs2!UserID
Me.thename.Value = rs2!UserName
Me.Image6.Picture = rs2!Photo
DoCmd.OpenQuery "updateUserChoice"
thecounterAll = thecounterAll + 1
rs2.Close
Set rs2 = Nothing
Else
Set rs2 = CurrentDb.OpenRecordset("randomUser")
Me.theuserid.Value = rs2!UserID
Me.thename.Value = rs2!UserName
Me.Image6.Picture = rs2!Photo
DoCmd.OpenQuery "updateUserChoice"
thecounterAll = thecounterAll + 1
rs2.Close
Set rs2 = Nothing
End If
Here where i move to the other form:
Code:
Private Sub ahmad100_Click()
askedAhmadNum = 1
DoCmd.OpenForm "form1"
End Sub
it is only done once as a page load but I want to reload the page before entering from the other form, here is what i did in the other form:
Code:
If (closetheform = -1) Then
DoCmd.Close acForm, "form1"
Forms![Main].Requery
End If
where the first form is called Main. Requery is not acting as a reload, I also did Refresh as well no lock!