Replace value in a table by using dropdown menu on a form

J

Johanna Gronlund

Hello,

I would really appreciate your help with this. I have been trying to solve
this for several days now. I have a form with a dropdown menu with company
IDs. The record source for the table is CompanyID table. I have used the row
source field in the combo box to show the Company names as well as the IDs on
the dropdown menu.

I now want to update the CompanyID table with the company ID that the user
chooses from the dropdown menu. I have been unsuccesful in doing this so far.
The chosen ID is currently added to the table rather than replacing the
previous one. Is there a way to do this?

Many thanks in advance,

Johanna
 
W

Wayne-I-M

when you say "CompanyID" is this an autonumber field in the table or a
calculated result
 
P

pietlinden

Hello,

I would really appreciate your help with this. I have been trying to solve
this for several days now. I have a form with a dropdown menu with company
IDs. The record source for the table is CompanyID table. I have used the row
source field in the combo box to show the Company names as well as the IDs on
the dropdown menu.

I now want to update the CompanyID table with the company ID that the user
chooses from the dropdown menu. I have been unsuccesful in doing this so far.
The chosen ID is currently added to the table rather than replacing the
previous one. Is there a way to do this?

Many thanks in advance,

Johanna

If your form is opened in Edit mode, you should be able to change the
values of existing records through the form. Are you using buttons to
navigate the records or are you using the built-in record navigation
(use that instead). Then try.
 
J

Johanna Gronlund

CompanyID is an autonumber.

--
Johanna G


Wayne-I-M said:
when you say "CompanyID" is this an autonumber field in the table or a
calculated result
 
J

Johanna Gronlund

Sorry, I don't think I was being specific enough.

There are two tables here:
1. CompanyID table with only one company ID on it at any time (this is my
aim). I have selected this table as the record source for the form.
2. CompanyDetails table with details of all companies on it (row source)

The form that I have has a dropdown menu and a button for opening a report
on it. No other values are displayed on the form. I just wanted the selected
company ID to be updated on the CompanyID table so that any subsequent report
would be displayed for that company only.
 

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