|
-
Sep 4th, 2002, 06:45 AM
#1
Thread Starter
Addicted Member
no current record
Hi all
When I open the form that has information in the database , there is no problems at all, but when I open the form with empty database this is the message I get. no current record.
Any one can help me to handl this problem please.
I will be highly appreciated.
Thank you
Mohammed
-
Sep 4th, 2002, 06:49 AM
#2
PowerPoster
hi
While displaying the records use EOF and BOf properties of the recordset.
-
Sep 4th, 2002, 08:00 AM
#3
PowerPoster
Well
Or use this :
VB Code:
rst.MoveLast
rst.MoveFirst
If rst.Recordcount = 0 them Msgbox "No Records in table !!!"
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Sep 4th, 2002, 08:01 PM
#4
Lively Member
to use the EOF...
VB Code:
' Before opening your form (perhaps on Form Load)...
if rst.eof then
msgbox "No records found!"
' Close the form or whatever
else
'Open the form
End if
-
Sep 4th, 2002, 08:04 PM
#5
PowerPoster
Well
Won't VB Crash with a MsgBox in the Form Load event?
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Sep 4th, 2002, 08:09 PM
#6
-
Sep 4th, 2002, 08:11 PM
#7
PowerPoster
Well
Explain "check the state", Need a Life Member...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Sep 4th, 2002, 08:14 PM
#8
Need-a-life Member
VB Code:
If rst.State = adStateOpen Then
'Work with the recordset
End If
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Sep 4th, 2002, 08:45 PM
#9
Lively Member
Won't VB Crash with a MsgBox in the Form Load event?
no...it won't crash.
-
Sep 4th, 2002, 08:47 PM
#10
PowerPoster
Well
Sorry I was thinking of an unload event when loading the form. Sorry...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|