473,414 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Combobox - refresh problem?

Using A2003 w/ tables linked to SQL Server. All users have their own
copy of the mdb. I have a combobox whose rowsource is a query. This
query is based on a table and has a field in it that indicates if the
record has been selected. When user1 selects the record from the
combobox, the field is updated that the record has been selected. If
user2 tries to select that same record, they get a warning that user1
has selected it and they need to wait until user1 is finished. When
user1 is finished, the field is updated and user2 should now be able
to select the record.

My problem is getting the combobox to refresh after the field has been
updated. When user1 is finished with the record, the updated field
indicates they're not on that record anymore. But for user2, the
field indicates that user1 is still using the record.


This query is a union query that displays names in both "last name,
first name" order and "first name, last name" order.


I've tried requerying the combobox in the Enter, Click, and GotFocus
events. The only thing that works is closing the form and
reopening.


I assume this is a refresh problem since closing and opening the form
solves the problem. Where else can this combobox be refreshed?


Thanks for any help or advice.
Oct 10 '08 #1
4 2447
You could try a 'requery' instead of a refresh.
Oct 10 '08 #2
My apologies. I am using "requery", not refresh. I say both words but use only "requery" in coding.
Oct 10 '08 #3
Fair enough. =)

I had a similar problem a while back and having a macro to Requery a certain control solved it.

Would be easier to have the query only show those that aren't locked by the other user?
Oct 10 '08 #4
That's not a bad idea but the 2nd user might freak when they try to select a record they know should be there. I could display a message that the record *is* there, just being used by user1.

However! I may have found the answer to my original post. After receiving the warning message that user1 has the record, if user2 clicks on another control other than the combobox, then clicks back on the combobox, it gets requeried. Now I have to figure out where to put the coding to set focus to another control after user2 gets the warning message. My first attempt gave me error #2108 - "You must save the field....."

Thanks for your time and replies
Oct 10 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: John Tyce | last post by:
When a button is clicked, a date is inserted or added into a combo box like this : ComboBox.Items.Add(string) or ComboBox.Items.Insert(0,string); Either way, the new string does not show up in the...
0
by: AR | last post by:
I have a datagrid containing a single combobox column. It also contains an 'Add New Row' button at the bottom of the datagrid. The datagrid is in a form that contains 'Save' and 'Restore' buttons....
5
by: ross kerr | last post by:
Hi All, I am extending the combobox to create a control that selects an item based on the text the user is typing into the text area of the control. I have an issue that occurs only when i...
5
by: Eric A. Johnson | last post by:
Hi Everyone, I am at my wit's end here. I have a combobox (combyQueryTitle) that I need to use in order to select a query for my database project. Therefore, I am using the...
0
by: lv2compute | last post by:
I am having a problem with my datagridview. I have a small table that has two columns. The first column is bound to my dataset. The second column is a combobox. I add items to the combobox based on...
6
by: Scotty | last post by:
Hi, I need some info How to return the value from the database My combobox Me.cboTypeAdres.Items.Add("Type Adres") Me.cboTypeAdres.Items.Add("Leverancier")...
1
by: MrNobody | last post by:
I have a ComboBox on my form, and I set it's DataSource to an ArrayList of custom objects. Everything loads fine, all the entries I initially loaded into the ArrayList appear in my ComboBox. ...
3
by: ApexData | last post by:
COMBOBOX REFRESH DILEMMA ' I have been working for hours trying to figure out how to requery a combobox in a subform, from a Popup form ' that this subform had launched. Basically, I designed...
2
by: billa856 | last post by:
Hi, My project is in MS Access. In that I have one Form in which I have some Comboboxes. 1st one is Independent, 2nd one is dependent on first one, 3rd one is dependent on 1st and 2nd both....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.