filling fileds in a form based on criteria

P

pat67

Hi, I have a form that edits a table. What I am trying to do is when a
certain filed is filled, two other fileds are fillled based on the
first field. What it is exactly is a golf form so when I input the
course id it fills the course name and tees played from.

Table is like this

Date Course ID Course Tees Player
Score


I enter a date and the a course id. what i want is when i enter the
course id, that the course and tees fields be updated. The course id
is linked to another table that has course name and tees. I can do it
by using an iif staement in the control source of the text box and
that fills it. However it does not edit the table becuase the text box
is unbound. So i need to use code in the after update field of the
course id box. I just don't know how it needs to look. Any help would
be appreciated
 
J

John W. Vinson

Hi, I have a form that edits a table. What I am trying to do is when a
certain filed is filled, two other fileds are fillled based on the
first field. What it is exactly is a golf form so when I input the
course id it fills the course name and tees played from.

Table is like this

Date Course ID Course Tees Player
Score


I enter a date and the a course id. what i want is when i enter the
course id, that the course and tees fields be updated. The course id
is linked to another table that has course name and tees. I can do it
by using an iif staement in the control source of the text box and
that fills it. However it does not edit the table becuase the text box
is unbound. So i need to use code in the after update field of the
course id box. I just don't know how it needs to look. Any help would
be appreciated

The course name and tees fields should simply NOT EXIST in this table - only
the CourseID. Storing them a second time is redundant and runs the risk of
invalid data - a course that's named "The Royal and Ancient Golf Club of St.
Andrews" in the courses table and "Wieser Idaho Rec Department Course" in the
other table.

Just store the course ID, and display the other information on the form as
needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top