473,414 Members | 1,594 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.

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 2062
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*********@comcast.net> wrote in message
news:db*************************@posting.google.co m...
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*********@SeeSig.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*********@comcast.net> wrote in message
news:db*************************@posting.google.co m...
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
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...
8
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...
30
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...
0
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...
9
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...
4
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...
2
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...
3
by: kpeeroo | last post by:
Private Function AddCompanyOvertime() As Integer Dim companyID As Integer = GetCompanyID() Console.WriteLine(companyID) Dim paramCompanyID As New SqlParameter("@CompanyID",...
2
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...
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?
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
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...
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...
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.