Issue with calculated filed in table (1 Viewer)

sandya

Registered User.
Local time
Today, 18:21
Joined
Oct 27, 2013
Messages
82
Hello all, need for help on calculated filed in table

As per shown on screenshot Printout filed is calculated filed from ([Item] & "-" &
Code:
) fields. So this calculation is working well. 

But in Code filed is letters with number is there so i need only letter format without number in Printout filed. Ex. as per shown on screenshot top and right side in the Sample filed. So how to do change the above calculation? i have attached the screenshot so can anyone help on my issue :confused:


Thanks,
Sandhya
 

Attachments

  • Calculation field in table.jpg
    Calculation field in table.jpg
    79.7 KB · Views: 71

plog

Banishment Pending
Local time
Today, 07:51
Joined
May 11, 2011
Messages
11,658
You've made a few fundamental errors: 1. You shouldn't store calculated fields. So you shouldn't be saving this data in a table, you should be producing it using a query. [Printout] shouldn't be a field in a table, it should be a field in a query.

2. You should store discrete pieces of data by themselves. Your
Code:
 field should be 2 fields.  Since the 'LA' portion designates something and the numerical portion denotes another, these two pieces of information should go into their own fields.

For example's sake, let's say you break [Code] into [CodeLetters] and [CodeNumber].  That mean's after making the changes I recommend you would have a query in your database with this calculated field:

Printout: [Item] & "-" & [CodeLetters]

Then whenever you need to use Printout you reference that query and it produces [Printout] for you.
 

sandya

Registered User.
Local time
Today, 18:21
Joined
Oct 27, 2013
Messages
82
Okay i got your good suggestion and I just tried into my require query as you preferred in the post calculation of Printout: [Item] & "-" & [CodeLetters] but that is not working and shown only Item field details & middle "-" hyphen Like (1 Way Switch-) in Code filed letter or Number both of is not came in printout filed :(

I'm tried also:
Printout: [Item] & "-" & [CodeLetters]
Printout: [Item] & "-" & [CodeNumbers]

but both of not working in the query

Thanks,
Sandhya.
 

plog

Banishment Pending
Local time
Today, 07:51
Joined
May 11, 2011
Messages
11,658
I'm sorry, I can't really follow you. Are you saying that it runs, but doesn't put the ending piece of data after the hyphen?

You're not getting an error message, correct? But its not producing the correct results when it does run, right?

My guess is that you haven't populated [CodeLetters] and [CodeNumbers] with data. It sounds like they are blank in the underlying table. If not for all records, at least for some.
 

sandya

Registered User.
Local time
Today, 18:21
Joined
Oct 27, 2013
Messages
82
Yes, am getting an error message a “Enter Parameter Value-CodeLetters” and force to run click on ok but not working correctly there is no Code filed details and shown Item filed details with hyphen only in Printout calculated filed.

So there is any chance to club both of Code (without numbers) & Item field’s data in calculated field??? :banghead:

I have attached the sample dB if possible can you please see once and solve the problem :(

Query: PrintoutQry


Thanks
 

Attachments

  • Products.zip
    81.2 KB · Views: 69

plog

Banishment Pending
Local time
Today, 07:51
Joined
May 11, 2011
Messages
11,658
I'm unable to open your database, but it sounds like you haven't create the [CodeLetters] field in your table. You can't use a field that doesn't exist.
 

sandya

Registered User.
Local time
Today, 18:21
Joined
Oct 27, 2013
Messages
82
I'm sorry, if you trouble face with my issue. finally am asking one thing

you said it is not possible in table ok i can understand. So at least possible in query?? or it is not possible in both of table and query??
 

plog

Banishment Pending
Local time
Today, 07:51
Joined
May 11, 2011
Messages
11,658
Yes, possible in a query. However it doesn't sound like you've changed your table to allow you to do this. See post #2
 

Users who are viewing this thread

Top Bottom