Access Video Quiz D2.3By Richard RostWhich Combo Box Column Selects Commission Rate? Which VBA function converts a numeric string into a number before doing math? Welcome to another Microsoft Access Video Quiz. You will be asked five Developer-level questions covering combo box columns, numeric conversion, Null validation, setting focus before opening a drop-down, and Boolean validation functions. Answer each question, check your score, and see how well you know Microsoft Access VBA. Recommended CoursesWant More?Keywords |
||||||||||||
| Age | Subject | From | |
| 2 days | Post Your Quiz Score Here! | Richard Rost | |
More Information
Transcript
This one's for developer level students.
I'm going to give you five questions covering VBA.
You'll have three seconds to answer each one, so hit that pause button if you need more time.
Keep track of your scores so we can see how you did at the end.
Are you ready to face Q's cosmic validation trial?
Here we go.
Question 1.
A combo box row source includes ID, first name, last name, and commission rate in that order.
Which expression retrieves commission rate from the selected row?
Column 4, Column 2, Column 3, or Column commission rate?
That's going to be Column 3.
Remember that the first column is 0.
Question 2.
A numeric value taken from a combo box column is being treated as text. Which VBA function is commonly used to convert a numeric string into a number before doing math?
Val, Format, C String, or Message Box?
That's going to be Val, or value.
Question 3.
Why might a validation routine test whether a numeric input is Null instead of automatically rejecting a value of 0?
Null means a null value is entered, while 0 may be a legitimate entered value.
Null and 0 always mean exactly the same thing in VBA.
Testing for 0 prevents the control from receiving focus.
That'll be answer B. Null means a null value is entered, while 0 may be a legitimate entered value.
Question 4.
VBA needs to open a combo box drop-down after detecting that the user has not selected a value.
What should code normally do before calling the combo box's drop-down?
Save the current record with a DoCmd.Run command?
Require the combo box row source, set focus to the combo box, or change the combo box bound column to 0.
That'll be C: Set focus to the combo box.
And question 5.
A form has several required controls to validate before calculating a result.
Which design best lets one reusable VBA routine tell the calling code whether every validation test passed?
Use a sub-procedure and display a message after every test, but do not return anything.
Use a Function As Boolean that returns False when the test fails and True only after all tests pass.
Put every validation rule in a table validation rule property.
Use On Error Resume Next and calculate the result regardless of missing values.
And that will be B. Use a Function As Boolean that returns False when a test fails and True only after all tests pass.
Alright, how'd you do?
Were you appointed Arbiter of Reality with unlimited snap privileges?
Or did you put humanity on trial?
But forget the charges.
Well, if you missed any, these topics and a lot more are all covered in Just Developer Level 2 Lesson 3 on calculating commissions.
Thanks for playing.
Post your score in the comments below.
Just try not to put the combo box on trial for crimes against humanity.
And until next time, live long and prosper.Intro
|
| |||
| Keywords: Access Video Quiz, VBA combo box Column property, combo box selected row value, Val function VBA, VBA Null vs zero validation, combo box dropdown SetFocus, VBA validation function Boolean, Access form required field validation, calculating commissions VBA PermaLink Which Combo Box Column Gets Selected Commission Rate in Microsoft Access? Video Quiz D2.3 |