calculated field to populate ODBC table

G

Guest

Hi,

I have an ODBC-linked table that i want to write to. There are identifying
fields for this table, cost code and category (therefore, not odbc
writeable). There's a field called misc amount that is odbc writeable - this
is my target field.

I created a form and it calculates the value I want to use to populate my
target field.

My questions are:
1. How do I make my calculated field write to my table (I know this is a
no-no but we REALLY need it)
2. How do I make sure that I'm writing to the correct row (correct cost code
and category)

Thanks a lot!

Michelle
 
G

Guest

Use an update query. Just make sure you set the criteria so it will be for
the right records.
 
G

Guest

Hi Karl,

I changed my query to this:

UPDATE MASTER_JCM_CATEGORY, [Cost Projections Main Table] SET [Cost
Projections Main Table].Misc1 = "Msc_Cat_Amt_2"
WHERE (((MASTER_JCM_CATEGORY.Cost_Code)=[forms]![WAB Cost
Projection].[Cost_Code]) AND ((MASTER_JCM_CATEGORY.Category)=[forms]![WAB
Cost Projection].[cmbCat]) AND ((MASTER_JCM_CATEGORY.Job)=[Enter Job
Number]));

and I got these errors:

type conversion, key violations, lock violations and validation rule
violations.

Any idea on what's going on?

Thanks again.
 
G

Guest

I can't help with this. I suggest you repost your query and error message.


Michelle K said:
Hi Karl,

I changed my query to this:

UPDATE MASTER_JCM_CATEGORY, [Cost Projections Main Table] SET [Cost
Projections Main Table].Misc1 = "Msc_Cat_Amt_2"
WHERE (((MASTER_JCM_CATEGORY.Cost_Code)=[forms]![WAB Cost
Projection].[Cost_Code]) AND ((MASTER_JCM_CATEGORY.Category)=[forms]![WAB
Cost Projection].[cmbCat]) AND ((MASTER_JCM_CATEGORY.Job)=[Enter Job
Number]));

and I got these errors:

type conversion, key violations, lock violations and validation rule
violations.

Any idea on what's going on?

Thanks again.






KARL DEWEY said:
Use an update query. Just make sure you set the criteria so it will be for
the right records.
 

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