473,396 Members | 2,030 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,396 software developers and data experts.

Disabling the Save Button

Abhean
32
Working on a record check and all seems to work as I expected until I attempted to disable one of my buttons on the form. Now, none of the pulled information shows on the form as it did prior to the introduction of
Expand|Select|Wrap|Line Numbers
  1. Me.ClientFullSaveBtn.Enabled = False
. Thoughts or suggestions?

Expand|Select|Wrap|Line Numbers
  1. Private Sub CAccountTxt_AfterUpdate()
  2. Dim db      As DAO.Database
  3. Dim rst     As DAO.Recordset
  4. Set db = CurrentDb()
  5. Set rst = db.OpenRecordset("ClientTbl", dbOpenDynaset)
  6.  
  7.     With rst
  8.            If Not (.BOF And .EOF) Then
  9.                Call .MoveFirst
  10.                .FindFirst "CAccount = '" & Me.CAccountTxt & "'"
  11.                If Not .NoMatch Then
  12.                    'Found it Set all the fields!
  13.                    Me.CStartDate = !CStartDate
  14.                    Me.CClientName = !CClientName
  15.                    Me.CAddress1 = !CAddress1
  16.                    Me.CAddress2 = !CAddress2
  17.                    Me.CZip = !CZip
  18.                    Me.CPhone = !CPhone
  19.                    Me.CFax = !CFax
  20.                    Me.CTimeZone = !CTimeZone
  21.                    Me.CEmail = !CEmail
  22.                    Me.CHours = !CHours
  23.                    Me.CSales = !CSales
  24.                    Me.CCollectionFld = !CCollectionFld
  25.                    Me.CShippingFld = !CShippingFld
  26.                    'Close Save record BTN
  27.                    Me.ClientFullSaveBtn.Enabled = False
  28.  
  29.                Else
  30.                     'Didnt Find Record
  31.  
  32.                 End If
  33.            End If
  34.            Call .Close
  35.        End With
  36.  
  37. Call db.Close
  38. Set rst = Nothing
  39. Set db = Nothing
  40. End Sub
Oct 1 '20 #1
2 3272
isladogs
456 Expert Mod 256MB
First of all, why are you using an unbound form?
Secondly why disable the Save button on an unbound form?

Thirdly, if you must do this, try adding DoEvents just before the line disabling the button
Oct 1 '20 #2
Abhean
32
This was me playing and testing some ideas. Simply wondering why the result was happening the way it was. Thank you for the response.
Oct 5 '20 #3

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

Similar topics

3
by: Jack | last post by:
Hi, I am trying to use the following code to make the save button invisible in the asp form when the checkbox is either on or the session variable has a particular value. THE CODE IS AS FOLLOWS:...
3
by: Paul | last post by:
Hi I am trying to create an "Update" button for my form. So far I have got it working fine, posting back and updating the record. Great! However, I now want to make it so that when a user...
5
by: C Watson | last post by:
Hi, I'm wondering if anyone can help me with AJAX in ASP.NET 1.1. I have a very specific feature that I would like to use it for. I have a rather long form that the users use to enter data...
3
by: Rick Shaw | last post by:
Hi, can anyone help? I am fairly new to C# and need help with a functionlity in my app. What I need to accomplish is to be able to enable the SAVE button as soon as the user modifies a data in...
2
by: toddw607 | last post by:
Hi all! I am attempting to bring an SQL Server table into ASP.NET using the datagrid . I have set all cells to be a text box by which the user can just click on and edit the cell. I have a...
2
by: Eric | last post by:
Hi, I have a form that requires a save button to be clicked before closing the form. I would like a msgbox to pop up when the button is not clicked before closing. Can someone show me how i...
4
by: Whasigga | last post by:
Hi I've created a form that has 7 subforms. It is the same subform, bound to a table, just repeated. This form represents a week, and each subform is used to enter in data for each day of the...
1
by: QCLee | last post by:
Hello Sir, Im here again asking for help. I have a form and a subform relate to HVAC Windward Table. i have a SAVE button on the form that when clicked it saves data on the HVAC Windward Table but...
14
by: squrel | last post by:
Hello everyone, I m using some button using toolbar such as Add,Save,View,.... my save button is not working.... it doesnt give me any error but does not save to my database.... or showing in my...
1
by: amme | last post by:
i am beginner in MS Access i want to save entries on form(named: MDF) through a save button if form field "Primary Cable" (indexed with other field Primary Cable Pair) have duplicate value then on...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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...

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.