S
S
I have created a button to update a field. I am looking for it to show an
input box. I will then input the Day (Friday, Saturday or Sunday)
My problem is the input box is not showing up.
Here is my code.
Private Sub Command7_Click()
Set rec_ses = CurrentDb.OpenRecordset("select ceremony from entries group by
ceremony order by ceremony", dbOpenDynaset)
Do While Not rec_ses.EOF
'you specify the day for the ceremony in the input box
Day = InputBox("Specify the Day for Session " & rec_ses!Ceremony)
'this recordset contains all the entries in the current ceremony ordered
by entries
Set rec = CurrentDb.OpenRecordset("select * from entries where
ceremony=""" & rec_ses!Ceremony & """ order by [entry #]", dbOpenDynaset)
num_entry = 0
Do While Not rec.EOF
rec.Edit
rec!Day = rec!Day
rec.Update
rec.MoveNext
num_entry = num_entry + 1
Loop
rec.Close
'you go to next ceremony
rec_ses.MoveNext
Loop
rec_ses.Close
MsgBox "Update completed"
End Sub
Any help is greatly appreciated.
input box. I will then input the Day (Friday, Saturday or Sunday)
My problem is the input box is not showing up.
Here is my code.
Private Sub Command7_Click()
Set rec_ses = CurrentDb.OpenRecordset("select ceremony from entries group by
ceremony order by ceremony", dbOpenDynaset)
Do While Not rec_ses.EOF
'you specify the day for the ceremony in the input box
Day = InputBox("Specify the Day for Session " & rec_ses!Ceremony)
'this recordset contains all the entries in the current ceremony ordered
by entries
Set rec = CurrentDb.OpenRecordset("select * from entries where
ceremony=""" & rec_ses!Ceremony & """ order by [entry #]", dbOpenDynaset)
num_entry = 0
Do While Not rec.EOF
rec.Edit
rec!Day = rec!Day
rec.Update
rec.MoveNext
num_entry = num_entry + 1
Loop
rec.Close
'you go to next ceremony
rec_ses.MoveNext
Loop
rec_ses.Close
MsgBox "Update completed"
End Sub
Any help is greatly appreciated.