Link to home
Start Free TrialLog in
Avatar of Alphacircuits
Alphacircuits

asked on

Using a list box / combo box to hold a static value on a form.

I have a form I am using to load values in a table. I need the ability to select a value in a list or combo box (which is pulling from another table) and have that value remain static for multiple entries until changed instead of resetting with each entry. How might one go about this?
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

<and have that value remain static for multiple entries until changed instead of resetting with each entry.>
?

Can you walk us through a step-by-step, real world user scenario of what you ultimately need?
Avatar of Alphacircuits
Alphacircuits

ASKER

This database is being used to scan asset tags. I have a form that works great for adding records if your sitting at the desk but there are occasion when my guys need to scan ( with a wireless scanner) multiple asset tags and it is inefficient to go back and forth between scans to select the 'Category' from a drop down list.

What I am trying to do is create another form that will allow us to select a value from a drop down list E.G. "Laptop" and retain that value while we scan multiple laptop asset tags.

Does that help?
OK
Thanks for the clarification.

Not knowing how your app designates each separate "Scan", ...My guess would be to create a Global/Pubic variable that the Scanning app would look at instead of the combo box.

So the user might have to click a button that says "Multiple Scans", and set off code to load the variable and point the app logic to the variable instead of the combobox.

JeffCoachman
There is not a separate scanning app. I am just using a scanner to input values into an access form.
With each record that is added all fields on the form clear and you start again. I just want to be able to create a 'default value' that can be changed periodically using a drop down list.

<"There is not a separate scanning app.">
There must be something, ...AFAIK you can't just create a form, hook up a scanner and do what you are describing...


In any event, what I posted as a "framework" should work.

The code would read this value and insert into the appropriate field.
Create an *unbound* combobox (this should be unaffected by the "clear and you start again" that the scanner performs), then use code like this to insert the value into the appropriate field:
Me.txtCategory=me.cboCategory

Again, I don't know the details of how the scanner interacts with MS Access (how it initiates a new record, how it decides a record is "finished"...etc)

But again as a framework, this seems like a plan to me.
(can you post the relevant code from the form?)
OK, there is not a separate app, and the scanner is not making any decisions. It is just scanning a bar code and is programed to 'ENTER' after each scan.

Think of it like this. I have a form with one bound textbox called Asset#. I type in a tag #, hit enter, the record is added to the assets table and the textbox is now blank awaiting the next entry. Very generic...

The assets table does have many other attributes, but for this purpose I just want the asset # and a category. So as you have pointed out, without some special app that allows me to select values using a scanner, I can not associate a category with each asset#. So, I want to be able to set the category on the form and have that category I selected added to the asset table with each scan.
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, sorry for the confusion. I am by no means an expert so I had a little but of a hard time correctly articulating my needs.
ok, glad I could help