How do I replace the information in a datatable with different selections from a combo box?

Microsoft Access - SQL

I've got the code right, as anytime a user selects a UID or NAME from each combo box the datatable fills that information based on that person's UID or NAME, however, how do I make it so that the datatable continuously replaces the newly selected information rather than keeping the previous information there?

Imagine this showing up on a data table...you select UID = 1 and Jason and his information shows up, but then you select NAME = Maria, her info shows up, but Jason's remains...I only want one of them showing up everytime I select it from the combo box...

My code:

SELECT eDiscovery.NAME, eDiscovery.CASE FROM eDiscovery WHERE (((eDiscovery.UID)=Forms!frmMarimba!cmbUID)) Or (((eDiscovery.NAME)=Forms!frmMarimba!cmbNAME));

This is in the Row Source code space for the form (frmMarimba). How can I make it so only one row of data appears everytime I select something different from the combo box? Thanks!
johnt_83Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GRayLCommented:
Post the query behind the combobox.
0
wertykCommented:
its not "leaving" the data in there, it is fully refreshing the data, but the way your SQL statement is written, its getting all rows where the name matches the name selected, combined with all rows where the uid matches the uid selected. so when you have both a name and a uid selected, it will show 2 rows.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GRayLCommented:
You should have only one combo box, with two columns, ID and Name, showing the Name but storing the ID.  Then for the form recordsource:

SELECT eDiscovery.NAME, eDiscovery.CASE FROM eDiscovery WHERE eDiscovery.UID)=Forms!frmMarimba!cmbUID;
0
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.