473,320 Members | 1,940 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,320 software developers and data experts.

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 1904
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 = "Reassigning this record from " & .OldValue & _
" to " & .Value & "." & vbCrLf & "Continue?"
If MsgBox(strMsg, vbYesNo+vbDefaultButton2) = 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*******@accesstoledo.com> wrote in message
news:23**************************@posting.google.c om...
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*******@accesstoledo.com> wrote in message
news:23**************************@posting.google.c om...
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
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...
2
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...
2
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...
9
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...
2
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...
3
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...
7
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. ...
18
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...
22
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...
4
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.