473,748 Members | 9,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem - boolean value changes in record on form close.

This is a mystery! Why does the boolean value of a record change
without my input.

What follows describes the situation and the behavior.

Table1:
Field1: Text
Field2: Yes/No

Form1 has two subforms. Toggle1 selects Subform2
Form1 has no record source.
Subform2: Allows edits to Table1, Toggle2 changes the value of Field2

Renner and Winfred are the names in Field1 of two records in Table1.
Field2 has the datatype True/False. Subform2 of Form1 controls the
value of Field2.

After observing inconsistant behavior of Field2 changing value
strangely I decided to have Table1 remain open so I could observe
Field2 change values in the background while made edits or opened and
closed Form1.

Here is what happens.

• Table is open Winfred as the current record and Renner=False.

Step #1
I open Form1 and switch to Subform2 using Toggle1.
I make Renner=True using Toggle2. I observe Renner=True in Table1.
I close Form1 and Subform2 closes with it of course.
Table1 still shows Renner=True.
By the way, Winfred is still the current record.

Renner = True

Step #2
I open Form1 and switch to Subform2 using Toggle1.
I observe that Renner=True.
I also observe that Renner=True in Table1.
I make no edits.
I close Form1 and Subform2 closes with it of course.
Field2 in Table1 spontaniously changes values to Renner=False.
By the way, Winfred is still the current record.

There are no OnClose or OnUnload events for either Form1 or the
Subforms.
I've reconstructed Subform2.

What is happening here?
Nov 12 '05 #1
2 2083
To debug this, try opening Subform2 directly from the Database window.

Problem remains?
- Yes: remove all code form subform2.
- No: remove all code from the main form.

Problem gone?
- Yes: start adding code back until you find the culprit.
- No: If the RecordSource is a query, start looking for interactions
such as a foreign key in a related table with a Default Value that's
messing things up.

--
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.

"Douglas Buchanan" <db*********@co mcast.net> wrote in message
news:db******** *************** **@posting.goog le.com...
This is a mystery! Why does the boolean value of a record change
without my input.

What follows describes the situation and the behavior.

Table1:
Field1: Text
Field2: Yes/No

Form1 has two subforms. Toggle1 selects Subform2
Form1 has no record source.
Subform2: Allows edits to Table1, Toggle2 changes the value of Field2

Renner and Winfred are the names in Field1 of two records in Table1.
Field2 has the datatype True/False. Subform2 of Form1 controls the
value of Field2.

After observing inconsistant behavior of Field2 changing value
strangely I decided to have Table1 remain open so I could observe
Field2 change values in the background while made edits or opened and
closed Form1.

Here is what happens.

. Table is open Winfred as the current record and Renner=False.

Step #1
I open Form1 and switch to Subform2 using Toggle1.
I make Renner=True using Toggle2. I observe Renner=True in Table1.
I close Form1 and Subform2 closes with it of course.
Table1 still shows Renner=True.
By the way, Winfred is still the current record.

Renner = True

Step #2
I open Form1 and switch to Subform2 using Toggle1.
I observe that Renner=True.
I also observe that Renner=True in Table1.
I make no edits.
I close Form1 and Subform2 closes with it of course.
Field2 in Table1 spontaniously changes values to Renner=False.
By the way, Winfred is still the current record.

There are no OnClose or OnUnload events for either Form1 or the
Subforms.
I've reconstructed Subform2.

What is happening here?

Nov 12 '05 #2
Thank you, I found the problem in Form1 with code called from a module.

"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message news:<3f******* *************** @freenews.iinet .net.au>...
To debug this, try opening Subform2 directly from the Database window.

Problem remains?
- Yes: remove all code form subform2.
- No: remove all code from the main form.

Problem gone?
- Yes: start adding code back until you find the culprit.
- No: If the RecordSource is a query, start looking for interactions
such as a foreign key in a related table with a Default Value that's
messing things up.

--
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.

"Douglas Buchanan" <db*********@co mcast.net> wrote in message
news:db******** *************** **@posting.goog le.com...
This is a mystery! Why does the boolean value of a record change
without my input.

What follows describes the situation and the behavior.

Table1:
Field1: Text
Field2: Yes/No

Form1 has two subforms. Toggle1 selects Subform2
Form1 has no record source.
Subform2: Allows edits to Table1, Toggle2 changes the value of Field2

Renner and Winfred are the names in Field1 of two records in Table1.
Field2 has the datatype True/False. Subform2 of Form1 controls the
value of Field2.

After observing inconsistant behavior of Field2 changing value
strangely I decided to have Table1 remain open so I could observe
Field2 change values in the background while made edits or opened and
closed Form1.

Here is what happens.

. Table is open Winfred as the current record and Renner=False.

Step #1
I open Form1 and switch to Subform2 using Toggle1.
I make Renner=True using Toggle2. I observe Renner=True in Table1.
I close Form1 and Subform2 closes with it of course.
Table1 still shows Renner=True.
By the way, Winfred is still the current record.

Renner = True

Step #2
I open Form1 and switch to Subform2 using Toggle1.
I observe that Renner=True.
I also observe that Renner=True in Table1.
I make no edits.
I close Form1 and Subform2 closes with it of course.
Field2 in Table1 spontaniously changes values to Renner=False.
By the way, Winfred is still the current record.

There are no OnClose or OnUnload events for either Form1 or the
Subforms.
I've reconstructed Subform2.

What is happening here?

Nov 12 '05 #3

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

Similar topics

6
2459
by: PT | last post by:
I got a form with many text boxes, checkboxes and 3 drop downs. From that 3, 2 are dependant. I can choose one drop down, and the next drop down should display the dependant values of the first drop down chosed. And I have a submite button to submit all these values to DB. First problem: I cant keep the value of the selected text in the first drop down. It always goes back to the first value. (but the asp site extension changes...
8
9243
by: Bri | last post by:
Greetings, I'm having a very strange problem in an AC97 MDB with ODBC Linked tables to SQL Server 7. The table has an Identity field and a Timestamp field. The problem is that when a new record is entered, either from a form or from the table view of the table, when the record gets saved it immediately displays #DELETED# in all of the fields. However, if I close the form or table view and reopen the record has in fact been inserted. The...
30
4597
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a corresponding field in the lookup table. In my data table we store the ID in what I will call the 'key' field. == Description of the desired operation:
0
2215
by: mjsterz | last post by:
I've been working with VB .NET for less than a year and this is the first time I've posted on one of these groups, so let me apologize beforehand if I'm being unclear, not posting my issue correctly, posting to the wrong forum, or committing some other sort of faux pas. My team is developing a Windows Forms application using VS 2005 with SQL Server 2005 on the back end and we're having a problem using ComboBoxes data bound to lookup...
9
1492
by: Dave G | last post by:
The unexpected problem is this - say, 2 pcs called A and B, both running my Access program, both arranged in a FE/BE arrangement. There is an unbound form in the program. When the form opens all the fields are populated with the required data from the required record. When the form is closed every field is saved back to the relevant record, whether it changed or not. I now realise this is wrong - eg on machine A a name field changes from...
4
2555
by: Gilberto | last post by:
Hello, I have a couple of forms using the code to FIND AS YOU TYPE from Allen Browne (http://allenbrowne.com/AppFindAsUType.html). It worked PERFECTLY until yesterday when i splitted the db into FE/BE. The tables link ok and everything works ok EXCEPT this function. When i open the form it gives me a underlining line (iReturn = ctl.Parent.PageIndex IN THE PARENTNUMBER function in BOLD) and indicating that iReturn=0. I am new with access and...
2
2264
by: Mark | last post by:
Hi All, I am creating a music database for a friend and have run into a problem. Within the ALBUM table, I wanted to store the ARTIST_ID rather than the ARTIST_NAME. To do this, I intended to have have a command button on the album form which would open a search form (based on the artist table). This works as I wanted and allows me to get to one record. I then planned to have a button on the search form which when clicked, would updated...
3
3647
by: kpeeroo | last post by:
Private Function AddCompanyOvertime() As Integer Dim companyID As Integer = GetCompanyID() Console.WriteLine(companyID) Dim paramCompanyID As New SqlParameter("@CompanyID", SqlDbType.Int) Dim paramCompanyOvertimeID As New SqlParameter("@companyOvertimeID", SqlDbType.Int) Dim paramDate As New SqlParameter("@Date", SqlDbType.DateTime) Dim paramOvertimePrice As New SqlParameter("@OvertimePrice",...
2
2636
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to update the information which is stored in a SQL database. In testing we noticed that the form was updating correctly but the update mechanism was also updating the first record of the table in the sql database every time. No error messages are on...
0
8984
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
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
8237
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
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...
0
6073
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
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.