Hey everyone,
I have a form that opens another form with a listbox on it.
What i want is that IF the listbox on the 2nd form has nothing on it, then set a bunch of values, say "no suburb found" and then close the popup form (listbox form)
below is my code...
Code:
If lstSuburb.ListCount = 0 ThenMsgBox ("No Suburb Found")
frm![txtPostcode].Value = ""
frm![SuburbID].Value = ""
frm![txtSuburb].SetFocus
frm![txtSuburb].SelStart = 0
frm![txtSuburb].SelLength = Len(frm![txtSuburb].Text)
Exit Sub
End If
My current issue is that i cant get the listbox form to close!!!
If i put docmd.close after the msgbox, then the original calling form closes.
The same happens if i put the close command at the end near the exit sub!!!
Ahhhh
Such a basic idea and i cant seem to get it right!