Enter data based on data from another field.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In excel there is the if function to automatically enter data in a cell based
on data in another. I want to do this in access. I have one field "code"
and another I have "project." What I want to do is have data entered
automatically in the project field based on info in the code field. For
example if code has number 123 then project is 456 and so on.

Thanks
 
Lloyd

If you were still working in Excel, I can understand why you'd want this to
happen.

If you are working in Access, you need to understand that relational
database design is different than spreadsheet design. If you want to get
the best use of Access' features and functions, you can't feed it 'sheet
data.

You've described a "how" ... if you'll post more description of the "what"
and "why", the folks who read and respond here may be able to offer an
alternate approach that makes better use of Access' strengths.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
To try and explain it more. I have different segments of my company and
these are broken down by code. ie. transport 111, manufacturing 222, office
333. What I have done now is added a field to help explain the projects
further named Project Number. I know that some of the information I need to
enter corresponds directly with certain codes. What I want to do is have
access automatically enter data into the Project Number field based on the
value in the Code field. Example 333 is the value in the code field and I
want access to place 999 in the project number field automatically because of
that value.

Hope this explains it better.

Thanks
Lloyd
 
Why? Why do you want Access to do that? How will having 999 in a project
number field help you do what you are trying to do? (it still isn't clear
"what" that is...).

In Access, you could keep a "lookup table" that associates codes and project
numbers and NEVER have to duplicate that in other tables. A query gives you
a way to look up the project number that goes with the code you DID store.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

Back
Top