Still working on my Template Idea

JordanR

Registered User.
Local time
Today, 14:46
Joined
Jan 25, 2005
Messages
72
I may be oversimplifying my idea here, but I'm trying to have Form A, which has a source of Table A have fields automatically filled out with values from Table B when I select a template name and click a button that's on Form A. I simply have no idea how to make something this simple happen. Any ideas?
 
Will that work? My intent is that once they pick their template and click the button, the fields get filled out but by the values in Table B the record is then stored in Table A.
I'll try out your idea, but I'm not sure I see how it will work out.
 
I think you may be misunderstanding, data is not being duplicated between the two tables. Let me try to explain again.

TableA:
Case_ID
Date
Customer Name
ShortDescription
LongDescription
Classification

TableB
Template_ID
TemplateName
ShortDescription
Classification

FormA is based on TableA. Totally straight forward so far.
On Form A is cmbTemplate which is populated with values from TableB.TemplateName.

The user starts a new blank form on FormA, Selects a value from cmbTemplate and clicks cmdTemplate. Based on what value was picked from the combo box, short description and classification populate with the appropriate values that were found in TableB.
That make more sense?
 
The problem with that approach is that only a handful of records will be based on a template. Most of them will be unique entries. The templates are just meant as a way to rapidly fill some of the fields for some of the cases.
Example:

I have this form doing what I want but I'm only able to do it using a very long string of VB coding, and I just have to imagine there's a better way to do it.

Code:
Select Case cmbTemplates.Value
   Case 1
      Me.DateReported.Value = Now()
      Me.ShortDescription.Value = "Printer jam on {Enter Printer Name}"
      Me.Category.Value = "5 - Printer Issues"
etc....

All I want to do is be able to have the .value's filled in from a table instead of doing it all through longwinded code. I'm assuming there's a way to simply have a Case statement that checks Template_ID and fills in the appropriate fields
 

Users who are viewing this thread

Back
Top Bottom