473,804 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Lock on Form

newbie question here---
In Table1 I have basic membership information. Table 2 is 'event'
information. I have a form for Table2 with a combo box, where the user
will pick a member from Table1, and then fill in the rest of the data.

My question is this - I fear the combo box will be used incorrectly -
that is, they will use it to 'find' a record. Click on the drop down
box and make a selection. However doing that of course does not find a
record, it changes the current record. I was thinking I need some kind
of lock on that field that is in place after the user clicks a button
or something. If the record needs to be changed, they would have to go
eslewhere to ensure they know they are changing the record.

I'm sure many people have run into this before. If you could tell me
what you do to solve it, it would appreciate it. p.s. I do not know
VBA, if the only solution is in VBA you will need to walk me through
it step by step.Thank you.
Nov 13 '05 #1
2 1932
Use the AfterUpdate event of the combo to ask the user if they really meant
to reassign the value:

Private Sub cbo_AfterUpdate ()
Dim strMsg As String
With Me.cbo
If .Value <> .OldValue Then
strMsg = "Reassignin g this record from " & .OldValue & _
" to " & .Value & "." & vbCrLf & "Continue?"
If MsgBox(strMsg, vbYesNo+vbDefau ltButton2) = vbNo Then
.Undo
End If
End If
End With
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Andy" <an*******@acce sstoledo.com> wrote in message
news:23******** *************** ***@posting.goo gle.com...
newbie question here---
In Table1 I have basic membership information. Table 2 is 'event'
information. I have a form for Table2 with a combo box, where the user
will pick a member from Table1, and then fill in the rest of the data.

My question is this - I fear the combo box will be used incorrectly -
that is, they will use it to 'find' a record. Click on the drop down
box and make a selection. However doing that of course does not find a
record, it changes the current record. I was thinking I need some kind
of lock on that field that is in place after the user clicks a button
or something. If the record needs to be changed, they would have to go
eslewhere to ensure they know they are changing the record.

I'm sure many people have run into this before. If you could tell me
what you do to solve it, it would appreciate it. p.s. I do not know
VBA, if the only solution is in VBA you will need to walk me through
it step by step.Thank you.

Nov 13 '05 #2
Andy,
Don't bind the combo box to a field in the underlying query. That should
take care of it.

"Andy" <an*******@acce sstoledo.com> wrote in message
news:23******** *************** ***@posting.goo gle.com...
newbie question here---
In Table1 I have basic membership information. Table 2 is 'event'
information. I have a form for Table2 with a combo box, where the user
will pick a member from Table1, and then fill in the rest of the data.

My question is this - I fear the combo box will be used incorrectly -
that is, they will use it to 'find' a record. Click on the drop down
box and make a selection. However doing that of course does not find a
record, it changes the current record. I was thinking I need some kind
of lock on that field that is in place after the user clicks a button
or something. If the record needs to be changed, they would have to go
eslewhere to ensure they know they are changing the record.

I'm sure many people have run into this before. If you could tell me
what you do to solve it, it would appreciate it. p.s. I do not know
VBA, if the only solution is in VBA you will need to walk me through
it step by step.Thank you.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
40286
by: francis70 | last post by:
Hi, I have these 2 problem? Is there a way in Oracle to read UNCOMMITED data. i.e. in Oracle the normal behaviour is that a user's updates to a table are visible to other users ONLY when the user commits. But in Informix there is this thing called ISOLATION LEVELS. For example by setting the ISOLATION LEVEL to DIRTY READ, a user will read dirty data, i.e. the last uncommited updated value of a field by some other user. Is
2
3327
by: Roy Padgett | last post by:
I have a combo box where users select the customer name and can either go to the customer's info or open a list of the customer's orders. The RowSource for the combo box was a simple pass-through query: SELECT DISTINCT , , ,City, Region FROM Customers ORDER BY Customers.; This was working fine until a couple of weeks ago. Now whenever someone has the form open, this statement locks the entire Customers table.
2
4142
by: Iain Miller | last post by:
Struggling a bit here & would be grateful for any help. I have a table which has a list of people in it. Each person has a unique ID automatically allocated by Access but also belongs to one of 5 Groups - call them A to E. I'd like to generate a further automatic reference number based on something like Group/Unique ID so when I create a new record Access creates the Unique ID & I then enter in the group and then Access combines the two...
9
4163
by: Clint | last post by:
Hey all - Excuse the cross-post ... I'm not sure what the appropriate newsgroup would be for this question. I have a question that I'm not quite sure how to ask. For all I know, I have the verbaige completely wrong, but here goes nothing ... I'm currently using the MS Data Access Block for a desktop application I'm writing. Recently, I had to add a call to a web service, which in
2
1815
by: JM | last post by:
Hi I have created a Windows Form that takes input. When the Run button is pressed the form is disabled and the code checks some files and inputs the data into an Excel worksheet (that is hidden so that I cannot watch as it gets filled up). When it is done it saves the Excel file. I find that if I go into another program while it's trying to work on the Excel spreadsheet that not all of the data appears (missing data!). If I click...
3
2633
by: ~john | last post by:
I'm working on a multi-user system that at times may result in 2 users accessing the same screen. These screens allow the users to both view and update data. The problem comes when you have user A and user B viewing the same screen and user A submits his page that writes to the database. User B is now viewing a screen with invalid data. How do I prevent this scenario from happening with PHP? I thought about using a lock flag in a...
7
2688
by: D. Patrick | last post by:
I need to duplicate the functionality of a java applet, and how it connects to a remote server. But, I don't have the protocol information or the java source code which was written years ago. So, I used a packet sniffer and saw the protocol (TCP), the port, IP address, etc. All is good. I tried 2 different versions of .NET code to duplicate the requests to the remote server. Again, I used the packet sniffer and my packets seemed...
18
3515
by: elecooley | last post by:
I have a checkbox on the form that says "When all data has been entered, check this box". Right now it does nothing, but I want it to lock down that particular set of data so the data cannot be changed from the data input form. I would still like to be able to run queries on the data, but would basically like to lock down the data so other users cannont change it. Thanks for the help
22
3096
by: Zytan | last post by:
I have public methods in a form. The main form calls them, to update that form's display. This form is like a real-time view of data that is changing. But, the form may not exist (it is created / destroyed at user request). I can check form != null to prevent incorrect access. But, the form could disappear immediately after the check, before the method is run. Or someone could click 'close' when it's in the middle of an update. ...
4
4532
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst child apps of an IIS application and can be used by multiple users during the application life cycle and for multiple page loads for the same or different page under a root application. What I don't understand and need to know is whether that...
0
9594
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10595
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10089
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7634
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.