*

VB Database: Challenge Lab Week 5

Just when you thought it was safe to go back into the Challenge Labs...the insane instructor strikes again!

Because Weeks 5 and 6 were tied together, your Challenge Labs are, as well.  This is the Week 5 Challenge Lab, but it assumes you've done your regular Week 6 exercises, as well as the regular Week 5 exercises, which were to create to Login form.  Week 6 will be posted in a bit.

This week's Challenge Lab is to construct the Login form in a different manner.  You will still be using the DAO data control, but your challenge will be on the UI side of things...

  • I think having a frame around the UserID/UserName and Password input areas would look nice.  Make it so.
     
  • Instead of a text box for the UserID/UserName, you'll need to use a combo box. (Note: this is the regular combo box, not the data-bound one.)  You'll use the data from the Users table to populate the list.  Hint: Check out this interesting event that combo boxes (combo boxen?) have.
     
  • Since we had so much fun doing this last time, I want you to use runtime code to set the MaxLength of the Password textbox instead of the hard-coded design time property. Since this is the DAO data control things have to be done differently than last time.  Remember that until the form hits a certain state you won't have access to some properties/objects of some controls.  Here's some hints:
  • Access has a neat feature whereby when someone is done filling out one field the focus automatically moves to the next field.  Do this for the UserID/UserName and Password fields.
     
  • While you're at it, whenever someone moves into the Password box, automatically highlight/select any text that is in there.  Hint: look for properties starting with "Sel".
     
  • Extra credit: have the Administrator password automatically fill-in so that it's easier to test.
     
  • For the OK and Cancel buttons I want you to use a control array.  These articles should help:
  • Instead of hard coding any captions, you'll be pulling them from the resource file (see Challenge Lab Week 1 for questions on Resource files).  Here's some Spanish and French translations courtesy of Babelfish.
     
  • 101 Bullina China Shop Login Conexión De la Tienda De Bullina China Ouverture De Magasin De Bullina Chine
    102 Enter User Name and Password Incorpore el nombre y la palabra de paso del utilizador Entrez le nom et le mot de passe d'utilizateur
    103 &User Name: &Nombe del Utilizador &Nom D'Utilisateur
    104 &Password: &Palabra de paso Mot de &Passe
    105 &OK &Aceptar &OK
    106 &Cancel &Cancelar &Annuler
  • The Login form needs an icon.  You'll load this from the resource file, too.  Pick any icon file you wish to add to the res file
     
  • All those message boxes really need to have meaningful captions.  Find some way to easily apply a common caption of "Bullina China Shop Login" to them.  Remember that we have that handy global module now, as well as our friend the Resource file.  Remember, too, that we might want to use just "Bullina China Shop" other places in the application.
     
  • Lastly, remember what you learned last time about releasing forms.

I've attached a zip file of a possible solution.  The only changes I made to the Main form were to add the password as a default value to the logoff dialog and to make sure the file paths didn't crash.  If you did the first Challenge Lab you might want to include that Main form in your project.

Please ask if you have any questions.  (Hopefully I'm posting this in the database class and not one of my two others...)



Internet Content Rating Association Valid CSS!

Alrak's Course Resources ©2002-2007 Karla Carter. All rights reserved. This material (including, but not limited to, Mini-lectures and Challenge Labs) may not be reproduced, displayed, modified or distributed without the express prior written permission of the copyright holder. For permission, contact Karla.