473,386 Members | 1,758 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,386 software developers and data experts.

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 4146
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.google.co m...
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.google.co m...
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******@hotmail.com> wrote in message news:<24******************************@news.terane ws.com>...
"Sam Gledhill" <sa***********@hotmail.com> wrote in message
news:a1*************************@posting.google.co m...
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
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...
0
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...
8
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...
4
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...
2
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...
2
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...
3
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....
0
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...

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.