variables with different data types

H

hughess7

Hi

I am going round and round and not getting anywhere with this...

We have a set of Issue codes, and if used, some require additional mandatory
data capturing by the end user. For example

Issue: 3100 requires text
Issue 9700 requires two dates entering
Issue: 9850 requires two times recording as n.n (double, 1 decimal)
etc etc

How would I capture this info in the correct format and store as a date or
text or number etc?

I thought about having a settings table and list all codes with the relevant
variables eg

Issue V1 V2 V3 V4 V5
3100 text1
9700 date1 date2
9850 num1 num2
etc

but how would I present the form to the user with the correct data type
controls displayed for input?

Help please!!

Thanks
Sue
 
K

Ken Sheridan

Correction:

strCriteria = "Issue = " & Nz(Me.Issue, 0)

Ken Sheridan
Stafford, England
 
H

hughess7

Hi Ken

Thank you very much! I think I can work with this, one slight added
complication is some of the issue codes also require a calculation...

eg Issue 6250 captures timeA and timeB and the 3rd variable stored is B/A to
give a percentage efficiency. The reason why it has to be stored rather than
calculated on the fly is once the variables have been captured, they are
included in the actual Issue code description displayed on the form and other
reports. For this code the final desc would be:

- Repair unsupported by time recorded. Time is significantly lower than
claimed time. Time recorded is [TimeA] hours, time claimed [TimeB] hours
([Efficiency]% efficiency). (Def)

This also leads me to the other question, rather than just having boxes
displayed to the user, the system needs to have some text prompting for what
is required to be entered. I did think of splitting the Issue desc to Desc1,
Desc2 etc and using these as the label prompts maybe? But then I would need
to be able to concatenate all the data with the relevant punctuation and
spacing too to form the complete paragraph....

Any thoughts? Thanks...
Sue
 
H

hughess7

Thanks for the reply Bruce. If I understand this correctly I don't think it
would work as TextBox1 is used by more than one code as is Date1, Date2 etc.
Nice idea with using the Tag though, I've not used that before.

I think Ken's solution will work, it will just require a lot of case types
as there will be quite a few combinations and maintenance via code if any
extra issues are added at a later date which isn't ideal but I can't think of
making it work any other way.

Cheers

Sue
 
H

hughess7

Another complication is some of the issues require text which already exists
on a claim to be put into the description too eg VIN. This exists in the
table [Dealer claim]

eg Issue 4200: VIN number on claim [VIN] does not correspond to VIN number
on repair order [Text1]. (C/B*)

Where VIN is data that exists in the [Dealer Claim] table and Text1 is a
variable that is captured by the end user during the audit.

I am wondering if there is a slightly different way of dealing with this.
Most of the variables all relate to extra claim data, except the free text
which I can deal with by a generic comments box. The fields are: Diary Date,
VIN, Time recorded, Time Claimed, Parts Delivery date etc etc - these all
relate to the claim being audited. So maybe store these against the claim
rather than the individual issues used? The only complication with this being
that if a particular issue is used the system would still need to make sure
that specific data is captured eg the VIN or Diary Date etc etc and it would
need to extract this data from the claim to compose the Issue description.

Does this make sense? Would this information change the way you would
structure it?

Sorry, as you can see I am struggling to get my head round this, no wonder I
have a headache :).

Sue

hughess7 said:
Hi Ken

Thank you very much! I think I can work with this, one slight added
complication is some of the issue codes also require a calculation...

eg Issue 6250 captures timeA and timeB and the 3rd variable stored is B/A to
give a percentage efficiency. The reason why it has to be stored rather than
calculated on the fly is once the variables have been captured, they are
included in the actual Issue code description displayed on the form and other
reports. For this code the final desc would be:

- Repair unsupported by time recorded. Time is significantly lower than
claimed time. Time recorded is [TimeA] hours, time claimed [TimeB] hours
([Efficiency]% efficiency). (Def)

This also leads me to the other question, rather than just having boxes
displayed to the user, the system needs to have some text prompting for what
is required to be entered. I did think of splitting the Issue desc to Desc1,
Desc2 etc and using these as the label prompts maybe? But then I would need
to be able to concatenate all the data with the relevant punctuation and
spacing too to form the complete paragraph....

Any thoughts? Thanks...
Sue


Ken Sheridan said:
Correction:

strCriteria = "Issue = " & Nz(Me.Issue, 0)

Ken Sheridan
Stafford, England
 

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