Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB What!?

Status
Not open for further replies.

LegionOfDarkness

Technical User
Jul 14, 2003
12
US
I am A newbie who has bitten off more than he can chew. The database I have been tasked to design can no longer be properly designed through Access alone. VBA is required. I know nothing about VBA or VB, I have never written a peice of code in my life untill now. I am trying to get my form to populate using a command button because it will not do it through standard Access, this project is due Thursday. I am confident my design is sound. Any help that I can get would be greatly appriciated.
 
I am unsure what you mean by trying to get your form to "populate" using a button, but have you tried creating a button and seeing what options the wizard offers?
 
I have tried using the wizard to create the buttons. I have 24 questions and answers that need to be displayed on the form. When I open a new record, I need the questions to remain on the form, and I need the answers to be blank. I want to use this form to evaluate phone calls (I work for a quality assurance department). The problem I have now is that the form will work correctly as long as I am dealing with oast records. If i try to create a new record, the questions will not show up on the form, it stays blank.Im trying to create a button that will save the record in the database and open a new record with the questions displayed. I will be using option boxes or possibly check boxes for my answers.
 
Legion:

If I understand the situation correctly, you can do what you want without resorting to code.

You want the form to open to a new, blank record to allow data entry?

If this is what you need, base the form on the table where the data will be stored or on a query that uses that table.

Open the Properties dialog for the Form, select the Data tab and set the Data Entry property to Yes. When the form opens, it will open to a new blank record.

I would suggest that you also use an Add command button; make sure the Wizard is 'On' and follow the prompts.

Is this what you are looking for?

Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
I tried to use the wizard to create the button that will add the new record, my form is based off a query with the following fields: QuestionText, EvaluationAnswer, EvaluationHeaderID, GroupQuestionNumber, QuestionExclude, and GroupHeader.The form is set up so that my sub form consists of the questions, the question groups, and the answers, the form header has all the employee information and the evaluation date, time, ect. I changed the data entry tab to yes, but I get the same result: a blank form with no questions.The questions should always remain as I will be editing them on a separate form. I need to be able to enter evaluationheader info, and answers on each new record.
 
Legion:

The answer data are stored in a separate table correct?

The reason the subform shows as blank is that there is no related record (yet) in the answer table.

Question: Do you need all of the employee information to be displayed along with the answer form?

If so, I would use the existing main form to display that information, get rid of the sub form and add a command to open an answer data entry form (bound to the answer table). You would need to use some VBA with this to pass the PK value to the answer form and, on that form, to assign the value to the appropriate control.

If not, design the answer entry form based on the answer table and use a combo box (Employee PK and Employee Name) to pick the employee for whom the data are being entered. The combo source can come from a simple query pulling the employee id and name or from the employee table. Bind that combo box to the answer table field for the employee ID. No VBA required (other than what Access will create).

Is this moving us along?



Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
I took a different approach to my problem and have solved the problem, I do have other questions however. First off I have 24 questions of my form, I have options for yes and no. I have set the default to 0 leaving both options blank. I have set up expressions to assign a point value to each question. One txt box for points possible, and one for points earned. The first problem I have run into is that if somone were to accidently click an option that should be blank, there is no way to restore that option to blan without starting the evaluation over. Is there a way to perhaps set the properties of the options so that they can be "unclicked"? Second question: My expressions work for my calculated fields. However I cannot figure out how to get a total feild for both points possible and points earned to work. Also I would like to have a field that will convert the total to a percent for the entire evaluation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top