masked edit and variable scope - 2 questions for the vb5 demiurges

masked edit and variable scope - 2 questions for the vb5 demiurges

Post by Jennifer Wallac » Fri, 19 Jun 1998 04:00:00



hey folks.  still trying to solve two little *sy beensy puzzles:

1.  masked edit control in vb5 enterprise.  my book shows left
justifies, but this control either right justifies (with no fill
character) or centers (with correct length fill character) or will
finally left justify if i fill the whole thing with way too many little
_ characters.  (ugly).  help?

2.  i declare a variable public.  i set it to a value passed by another
form.  in my form_load event i build a string to change the caption,
like this

frmInvoices.caption = "Invoice : " & strInvoiceNumber

and presto, it hits this line, hits the form_load event again (why?) and
suddenly strInvoiceNumber is "" which means my retrieved database gives
me a "no records" error cause i pulled with a blank string.  what
happened to the variables value?  its public, defined in the
declarations section of frmInvoices.  hmmmm?