Welcome to the world of VB, where everything you do is harder than in VFP!
Here are the steps I recommend you:
- Create a new form (say, frmDate)
- Place a maskedit box on it (you will need to select MSMask32.OCX in the components form, Projects|Components)
- MaskEdit.Format = "dd/mm/yyyy" (or whatever date format you use)
- MaskEdit.Mask = "##/##/####"
- MaskEdit.PromptChar = " "
- You will need to write code in the Validate() event of the maskedit box to validate the date (the user can still enter 54/34/1999)
- In the Terminate() event of the form, issue Me.Hide
- In the calling form, issue "frmDate.Show vbModal"
- To get the date, ldDate = frmDate.MaskEdit.Text (you may need to format the date before)
- Unload the form, Unload frmDate
HTH
>I work for a company who writes bespoke software, I am a visual foxpro programmer who has been asked to maintain a project in VB 5.
>
>I am having difficulty.
>
>Could someone please help me.
>
>The program currently takes todays date to use on all invoices, the customer now wants to be able to change this date. I am trying to call a form with a textbox on, get a date, return the date, and use it in the program. I am having difficulty doing any of it.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only