Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB and Databases

Status
Not open for further replies.

rotschreck

Programmer
Jan 26, 2000
54
0
0
CA
www.geocities.com
So here I am trying to make a small program that runs in the background while minimized or something.<br>
<br>
I have to read the data from a date field in a database and when the date in the field and the current date are the same, the program has to warn the user.<br>
<br>
I figure a message box would work well, but how do I run it minimized?<br>
<br>
What functions would I use to get data from the database? <p> <br><a href=mailto: > </a><br><a href= Eclectic Page</a><br>
 
Hi,<br>
<br>
I am new in VB. Do hope that you can provide me some advice.<br>
<br>
I need to use VB to simulate a CAPP system on rotational componenets.<br>
<br>
Wonder how to create a data structure to show the machine process?<br>
Is it possible to create a lists of shapes to allow users to pick and formed to a parts?? How?<br>
<br>
Do u have any sample to show me??<br>
<br>
Thank you.<br>
<br>
andy
 
Hi,<br>
<br>
I am new in VB. Do hope that you can provide me some advice.<br>
<br>
I need to use VB to simulate a CAPP system on rotational componenets.<br>
<br>
Wonder how to create a data structure to show the machine process?<br>
Is it possible to create a lists of shapes to allow users to pick and formed to a parts?? How?<br>
<br>
Do u have any sample to show me??<br>
skybird_@hotmail.com<br>
Thank you.<br>
<br>
andy
 
rotschreck,<br>
If you're using a form to call this procedure from, just set the form to invisible after the button is pushed to initiate the process:<br>
me.visible = false<br>
<br>
The message box will come up regardless of whether the form is visible, then you can set the .visible to True when the process is done. <br>
If you are using Sub Main as the startup, and no forms, then it's invisible anyway, and a msgbox will notify that it's done.<br>
--Jim
 
Although I am not certain of what you are attempting to do; however, the dates, the database and the application must be involved as one, true? The users enter the dates through your application, the application saves this to a database and thereafter - later - retrieves these dates from the database.<br>
<br>
In this case you shouldn't need to &quot;hide&quot; the messagebox; rather, validate the entries after the user has entered the values.<br>
<br>
Assuming the data-field is either a masked-edit box or a date-time picker, I will refer to the two entries as txtDate1 and txtDate2. The item I would employ here is the DateDiff (Date Difference) function and although the name implies only dates, times are available with this one.<br>
<br>
When a user has entered the field(s) use the Validate as this:<br>
<br>
Private Sub txtDate1_Validate(KeepFocus as Boolean)<br>
<br>
If(DateDiff(&quot;d&quot;, Date2, Date1)) &lt;&gt; 0 Then<br>
Beep<br>
KeepFocus = True<br>
MsgBox &quot;These two dates are the same; please correct this.&quot;, vbCritical, &quot;Error with these two dates.&quot;<br>
Exit Sub<br>
End If<br>
<br>
Exit Sub<br>
End Sub<br>
<br>
If it is only a warning you wish to provide then delete the KeepFocus line.<br>
<br>
Hope this helps - your description did not detail if you are employing DAO, ADO or other. <p>Nicholas, BofA NetOps<br><a href=mailto: Nick.deLioncourt@BankofAmerica.com> Nick.deLioncourt@BankofAmerica.com</a><br><a href= > </a><br>Biologically Tagged as Alpha-Geek #234
 
Thanks for your help gentlemen.<br>
<br>
Nic,<br>
<br>
The user enters the date into the database.<br>
The application compares the dates with that day's date every morning.<br>
If the dates correspond, the messege box pops up and tells the user that a file needs to be updated.<br>
<br>
I hope this clears things up. <p> <br><a href=mailto: > </a><br><a href= Eclectic Page</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top