From: IN%"Mark.Jacobson@uni.edu" "MARK JACOBSON" 18-APR-2000 16:13:15.62 To: IN%"810-030-01@uni.edu" CC: Subj: Hands-on at 11 AND 12:30 WRT 112 lab... GROUP EXERCISE SOLUTION... ----------------------- Hi Visual Basic students, There will be a hands-on class on Thursday, April 20th in Wright 112. Please come to the 12:30 session instead of the 11 session, if you can and do not have a conflict. Look over carefully today's handout and how the SPLASH form and the SLEEP function was used, to prepare for the Thursday hands-on class. ******* Here is the solution to today's group exercise ******** Private Sub cmdOpenDatabase_Click() CommonDialog1.ShowOpen datTextBooks.DatabaseName = CommonDialog1.FileName datTextBooks.Refresh End Sub ****** The CommonDialog1.FileName and CommonDialog1.Filter property values are *.mdb ----- so the dialog box only shows Access database files. ******** I would use the Pepsi phrase or slogan to remember the Refresh method that is needed for the Data controls and Visual Basic. ------- CommonDialog1.FileName = "*.mdb" CommonDialog1.Filter = "*.mdb" is how you would do this at RUN time instead of DESIGN time probably in the FORM_LOAD event procedure or cmdOpenDataBase_Click as 1st two statements. Mark