Tip Bank

DevX - Software Development Resource

Inserting Control Characters

Question: How do I insert carriage return (Chr(13)) and line feed (Chr (10)) in a text box at run-time? Answer: Just use the ampersand (&) and add them to the

DevX - Software Development Resource

Type Mismatch Error

Question: I have an SQL statement in my program that looks like this:data3.recordsource = “SELECT id, date from reservations where (date = ‘” & maskededit1.text & “‘) and (id =

DevX - Software Development Resource

Detecting the Cancel Button

Question: In my “Save As” dialog box (from CMDIALOG.VBX), my OK button and Cancel button both save work. How do I recognize when the userpresses the Cancel button? Answer: One

DevX - Software Development Resource

Calling a Form’s Subroutines

Question: How can I call another Form’s subroutine? Answer: Under VB3 you can’t call another form’s subroutine. If you need to do this, put the sub into a .BAS module.

DevX - Software Development Resource

Searching Numerical Fields

Question: What it’s the correct SQl Statement to search an access database by a numeric field? I keep getting an invalid type error when I try to run the application.

DevX - Software Development Resource

Retrieving Binary Objects

Question: I am using VB together with Access. What I want to do is to include photo into my form. In Access table, I declare thisfield as an OLE field

DevX - Software Development Resource

Placing Windows on Screen

Question: I am trying to figure out exactly how to get mywindow to center itself no matter what the resolution of the screen is that it is beingdisplayed on is.

DevX - Software Development Resource

Copying a Directory Tree

Question: How do you copy entire directory structures with VB3, I’veread the -ONE- newsgroup article but it just lists them. Answer: Have you tried shelling to an XCOPY statement? It