If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
MassageBox
I create a program Audit Tools...and I want Make MassageBox if my subform
empty...I want make massagebox "No Data Found"...What Should I do???? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...arted/201005/1 |
#2
|
|||
|
|||
MassageBox
Hi
You will be able to see if a subform has no records so I don't understand why you would need a message popup also ??? But if you really want a popup then you'll need to count the records that should go into the subform and if the answer is 0 then you have the massage popup. Something like this will do Dim rsClone as Recordset set rsClone = Forms![YourMainFormName..]![YourSubformName..].Form.RecordsetClone if rsClone.recordcount = 0 then MsgBox "Hi, I don't have any records", vbInformation, "Subform has a problem" end if set rsClone = Nothing Of course change YourMainFormName and YourSubformName to what they really are. Hope this helps -- Wayne Manchester, England. "Achit via AccessMonster.com" wrote: I create a program Audit Tools...and I want Make MassageBox if my subform empty...I want make massagebox "No Data Found"...What Should I do???? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...arted/201005/1 . |
#3
|
|||
|
|||
MassageBox
Usually massages are done on a table or in a special chair, not in a box.
"Message Box", however, is almost universally understood when abbreviated as "MsgBox". If the OP really wants a MsgBox if there are no records to display in the Subform, this code in the Load Event of the Form embedded in that Subform Control should do the trick. If the OP is displaying a datasheet instead of a form, he/she shouldn't be. Private Sub Form_Load() If Me.RecordsetClone.RecordCount = 0 Then MsgBox "The Subform Has No Records" End If End Sub -- Larry Linson, Microsoft Office Access MVP Co-author: "Microsoft Access Small Business Solutions", published by Wiley Access newsgroup support is alive and well in USENET comp.databases.ms-access "Wayne-I-M" wrote in message ... Hi You will be able to see if a subform has no records so I don't understand why you would need a message popup also ??? But if you really want a popup then you'll need to count the records that should go into the subform and if the answer is 0 then you have the massage popup. Something like this will do Dim rsClone as Recordset set rsClone = Forms![YourMainFormName..]![YourSubformName..].Form.RecordsetClone if rsClone.recordcount = 0 then MsgBox "Hi, I don't have any records", vbInformation, "Subform has a problem" end if set rsClone = Nothing Of course change YourMainFormName and YourSubformName to what they really are. Hope this helps -- Wayne Manchester, England. "Achit via AccessMonster.com" wrote: I create a program Audit Tools...and I want Make MassageBox if my subform empty...I want make massagebox "No Data Found"...What Should I do???? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...arted/201005/1 . |
#4
|
|||
|
|||
MassageBox
wrote in message news:a86c54182956a@uwe...
Have you ever had sex it feels good. |
Thread Tools | |
Display Modes | |
|
|