AllExperts > Using MS Access 
Search      
Using MS Access
Volunteer
Answers to thousands of questions
 Home · More Using MS Access Questions · Answer Library  · Encyclopedia ·
More Using MS Access Answers
Question Library

Ask a question about Using MS Access
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scottgem
Expertise
I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience
I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

 
   

You are here:  Experts > Computing/Technology > Business Software > Using MS Access > Form Design

Using MS Access - Form Design


Expert: Scottgem - 7/8/2009

Question
QUESTION: I asked a question earlier about using unbounded controls and realize that there is probably a much more elegant solution to accomplish what I want to do in Access.

What I want is a form that does not use the recordset navigation, but instead uses ComboBoxes to navigate.

I am creating a simple note taking system that has only three fields Employee Name, Review Date and Notes.  What I want to have happen is that a drop down box allows you to choose the Employee (the number of employees is fixed) a review date (quarterly) and notes.  

If you choose an employee and a review date that has a record the notes should appear.  If there are no notes the field should be blank and the user should be allowed to add notes that are then saved to the database.

How do I do this?

Right now I am doing this using unbound controls and a manual sql insert in code.

Thanks!

ANSWER: First, I would add an autonumber primary key to your table. Second, I would set the table as the recordsource on a form. Third, I would use the combobox wizard to create a search combo, that allows you to search by name and date to bring up the matching records.

If there is no match for that persone and date, then just add a new record.

Hope this Helps,
Scott<>

---------- FOLLOW-UP ----------

QUESTION: How do I create the table as the recordsource?

And how do I get the combobox wizard to show up? I've already created a relationship between my NotesTable and EmployeeTable...

ANSWER: The Combobox wizard is on the Control Toolbox.

Hope this Helps,
Scott<>

---------- FOLLOW-UP ----------

QUESTION: Sorry, I'm completely lost here. To clarify. I have there tables now:

Review Table - Index, EmployeeID, ReportDateIndex, Notes
Report Dates Table - Index, Short Hand Date (e.g., Q1 '09)
Employee Table - Index, Name

The tables are linked so that EmployeeID links to Employee Table -> Index and ReportDateIndex links to Report Dates Table -> Index.

I have created a form based on Review Table showing EmployeeID, ReportDateIndex, Notes.

It's creating the combo boxes OK, it's just then when I change things in the drop down the notes don't change.

Answer
First, I don't see the need for the Report dates table. I would just have two tables:

tblReview
ReviewID (PK Autonumber)
EmployeeID (FK)
ReviewDate
Notes

tblEmployee
EmployeeID (PK Autonumber)
FirstName
LastName

I would then bind my form to tblReview. Finally, make sure you choose the 3rd option in the Combobox wizard to create a Search combo.

Hope this Helps,
Scott<>

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.