473,550 Members | 2,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Records change in subform!!

Hi, I'm hoping someone can help me out. I have a database with a
form. This form has no recordsource (I'm using it as a complex
MsgBox). It has a single textbox of type Date. It also has three
unrelated subform that are filtered according to the date entered in
the form's text box. By using after update events, I've been able to
allow users to change the date in the textbox and alter records from
the day throughout three other tables.

The problem arises when you close the form. It appears that the form
will alter the first record of the table linked to the first subform.
I don't want this to happen. I want existing records not to have the
date altered altered. Other fdetails can be changed (Yes/No on the
"delivered? " field fr example), but not the date.

Does anyone have any ideas??

Regards,
Sam.
Nov 12 '05 #1
3 4160
Unless you have done something to modify the contents of a control that is
bound to a field in the displayed record, nothing should be saved. I can't
determine from what you've described that you have done anything to change
the value in a control displayed in the subform. If you do so, then perhaps
you need to put a confirmation MsgBox in the BeforeUpdate event of the Form
embedded in that Subform Control.

Larry Linson
Microsoft Access MVP

"Sam Gledhill" <sa***********@ hotmail.com> wrote in message
news:a1******** *************** **@posting.goog le.com...
Hi, I'm hoping someone can help me out. I have a database with a
form. This form has no recordsource (I'm using it as a complex
MsgBox). It has a single textbox of type Date. It also has three
unrelated subform that are filtered according to the date entered in
the form's text box. By using after update events, I've been able to
allow users to change the date in the textbox and alter records from
the day throughout three other tables.

The problem arises when you close the form. It appears that the form
will alter the first record of the table linked to the first subform.
I don't want this to happen. I want existing records not to have the
date altered altered. Other fdetails can be changed (Yes/No on the
"delivered? " field fr example), but not the date.

Does anyone have any ideas??

Regards,
Sam.

Nov 12 '05 #2

"Sam Gledhill" <sa***********@ hotmail.com> wrote in message
news:a1******** *************** **@posting.goog le.com...
Hi, I'm hoping someone can help me out. I have a database with a
form. This form has no recordsource (I'm using it as a complex
MsgBox). It has a single textbox of type Date. It also has three
unrelated subform that are filtered according to the date entered in
the form's text box. By using after update events, I've been able to
allow users to change the date in the textbox and alter records from
the day throughout three other tables.

The problem arises when you close the form. It appears that the form
will alter the first record of the table linked to the first subform.
I don't want this to happen. I want existing records not to have the
date altered altered. Other fdetails can be changed (Yes/No on the
"delivered? " field fr example), but not the date.

Does anyone have any ideas??

Regards,
Sam.


Best idea is to visit the MVP site
http://mvp.org
N. Freemont, MVP

Nov 12 '05 #3
"N. Freemont" <nf******@hotma il.com> wrote in message news:<24******* *************** ********@news.t eranews.com>...
"Sam Gledhill" <sa***********@ hotmail.com> wrote in message
news:a1******** *************** **@posting.goog le.com...
Hi, I'm hoping someone can help me out. I have a database with a
form. This form has no recordsource (I'm using it as a complex
MsgBox). It has a single textbox of type Date. It also has three
unrelated subform that are filtered according to the date entered in
the form's text box. By using after update events, I've been able to
allow users to change the date in the textbox and alter records from
the day throughout three other tables.

The problem arises when you close the form. It appears that the form
will alter the first record of the table linked to the first subform.
I don't want this to happen. I want existing records not to have the
date altered altered. Other fdetails can be changed (Yes/No on the
"delivered? " field fr example), but not the date.

Thank-you both for you suggestions. On revision, I'm a little
sheepish to say I discovered that at some point I had inadvertantly
bound the textbox control to a table. I deleted this connection an low
and behold the bloody thing works!!

Thanks again,

Sam.
Nov 12 '05 #4

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

Similar topics

3
11091
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I have a primary form named TestResults, which is connected to data in a table named TestResults. There are basically two other tables that are...
0
1096
by: Dos Lil | last post by:
I am trying to insert records to a subform.The relationship b/w the 2 tables(empinfo,Timesheet) is one to many. I need to insert into subform(timesheet)new records based on the selection of the empno.Looks like when I am trying to add records in the subform after selecting the employee number ,it is again adding the employee number in the...
8
4883
by: John | last post by:
I have created a purchase order database that has a PO form with PO Details in the subform. I need to assign each PO a job number and the PO details subform also has a job number field (for easy of tracking elsewhere). I have a problem where if I change the job number on the main area of the form I need it to update ALL of the line items in...
4
3116
by: tlyczko | last post by:
I have been looking on the NGs and I found this code to show if a subform has no records. I have this code in the MAIN form OnClose event: Private Sub btnClose_Click() '4/16/06 new code that cancels the close event if the BeforeUpdate code fires '4/16/06 see...
2
2420
by: mavmavv | last post by:
I have a Form where I have created a duplicate record button, no problem... The subform is where my problem lies. The subform displays data matching the mainform's ID, these two values are linked. The subform has no primary key, since there are multiple matching entries. Basically the mainform displays Customer info + order totals, and the...
2
18598
by: gmlscripts | last post by:
I have a subform that shows images (0, 1, 2, ...etc) linked to a main form. I would like to display the current record number of total number of records for each linked record on the main form. (ie "Image" X " of " Y). My problem is that as I move between records on my main form, the record information on the subform does not change. I set...
3
11985
by: informankur | last post by:
Hi All, I am trying to create a form for updating values. I have a Table - ASP with Date, Product, Q1,Q2,Q3,Q4 fields. I have a Form ASP_Main with "Date" field for filtering by the date selected. There is a subform ASP_Subform embedded in the main form. What I am trying to achieve with a click of a button is - Filtered data shows in...
0
1213
by: Elizabeth Mitte | last post by:
Hello, Thank you for the tutorial type article, is proving very useful. However, I have been following your instructions step by step and still get errors with the code? Trying to create the module for the SelectedPublisherID function just will not work for me. Runtime error '2465' always occurs. It says it cannot find the field...
0
7561
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...
0
7488
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...
0
7999
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...
1
7520
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...
0
7845
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...
0
5129
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...
0
3532
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...
0
3517
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
801
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...

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.