Visual Basics for Access- How do I add fields to a subform based on txt field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • monicad82
    New Member
    • Dec 2009
    • 1

    Visual Basics for Access- How do I add fields to a subform based on txt field

    I'm a beginner programmer and was tasked to create a form containing 1) a text box where a user enters number of cars and 2) a separate subform

    Some conditions:
    -If user enters more less than 1 then prompt msgbox and exit procedure
    -If user enters more than 5 then prompt msgbox and exit procedure
    -if user enters 1-5 then show the subform and populate fields based on number of cars
    e.g. If user enters 3 in text box and clicks button, subform is populated with subform with Car Name field below.
    row 1 - "car1"
    row 2 - "car2"
    row 3 - "car3"

    This needs to be accomplished using DAO - Any ideas?
Working...