Macros and Programming


CardboxForumsMacros and Programming > "Avoiding search "White Wall""

Avoiding search "White Wall"

Is it possible to avoid the Select event displaying white error screen if search is false

Current user: [none]
Register / Log In · Help

Posted By Post


15-Feb-2015 17:18

I'm wondering if it might be possible to "interupt" the Select function to avoid the white error window. Reason is simple. If an error occurs whilst using a macro, the user has got to click the little "X" bottom left to exit macro, and then use "Search->Undo" from menu to return to main screen again. I wondered if it might be able to somehow impliment the following ...

x=InputBox("Enter SIM" &VbCrLf& "When using a barcode scanner ... enter SIM number manually")
if x="" then Halt

Set recs=Database.AllRecords
Set recs=recs.Select("SIM",x)

If IsObject(recs) Then
ActiveWindow.Select "SIM",x ' This part works fine if the record DOES exist
MsgBox("Sorry, that record was not found")
End If

Or is it coded such that "on error" the Select option will always display the error screen, and no way around it?


15-Feb-2015 18:36

There we go again.
Find the answer in Help "Master index of properties and methods".
Take time for 30 minutes reading and you a get a lot of information for your job.
Hint: If there are no records any more in a selection, then mentioned screen appears. However: "no records" is as much as.... ZERO records.


16-Feb-2015 12:05

Exactly how prey do ANY of those commands help me avoid the scenario where someone uses the SELECT command and enters "XYZ" when there is no such entry in the database?

I think the last "hint" says it all: The white screen CANNOT BE AVOIDED - (that's all I needed to be told, not about reading the instructions which won't help this scenario anyway!) So when someone types "XYZ" and it doesn't exists, that screen appears. End of story, and there's no way to avoid it.

** I write questions in polite terms, and your replies to me are ALWAYS agressive whatever I ask. OK, perhaps it is covered in manual, but a few helpful words / pointers won't go amiss. With most helplines, they will try to HELP you, and give you pointers as to where you might find a solution to a problem rather than (effectively) a terse "It's somwhere in the manual: Open your eyes, you moron!"

I was going to ask you how to do do this macro so it doesn't visible switch screens (and yes, I've hunted through the book searching "format" trying to find something and it only mentions "View->Change" menu option) but I know your response will be "Look In The Manual" even if there is no direct solution.

Format="Photo Proof"
Print cbxPrintMainRecord

I'll probably have to find the solution / alternative myself


16-Feb-2015 12:49

Dear Chris,
Without reading program manuals you can never program. You never did read a book about Visual Basic Script. You never took time to read and understand. If you dont know about something you write "this does not work in Cardbox, that does not work, that is impossible etc ect". Is that what you call normal communication?
Your question could be "how can I reach that... etc?" I direct you to the manuals because all your question are described there.
This example also now: never read about counting records in your object? A blank screen has ZERO records. You know there are zero when you count your records.
If zero, then undooneselectionlevel. Solved. No blank screen.
That is why I become a little tired from questions where the answers are written on YOUR screen. And there never: 'sorry I overlooked'. Polite? Ok!

Quick Reply

Please log in or register before trying to post a reply.

© 2010 Cardbox Software Limited   Home