473,700 Members | 2,631 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 4166
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
11102
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 related to the TestResults table (and the primary form) named Names-Normalized and SiteAddresses. The...
0
1103
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 Empinfo table and hence giving an error saying cannot insert dupicate record.All I want to do is...
8
4886
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 the sub form. I can get it to update the line item that currently has focus but not the others. ...
4
3129
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
2432
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 subform displays the products. When I goto duplicate the record, the ID from the duplicated...
2
18628
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 the subform to NOT show the navigation button (I put command buttons on the form with that...
3
12017
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 ASP_Subform, so Copy this whole data, change the date in ASP_Main to today's date and paste the data...
0
1222
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 SelectPublishers in your expression. There is an 's' at the end of my Publishers as I named my form this. How...
0
8731
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
8649
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
9081
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8931
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6564
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
4408
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
4660
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3097
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2032
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.