473,320 Members | 2,146 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,320 software developers and data experts.

Update date in main form when entry is made in subfrom

I am using Access 2007. I have created a client tracking access database that has two main tables the Client table and a Notes table. The notes table contains in client Id order all of the notes per client. The table consists of (Client_Id, (foreign key to Client Table) Entry_Date, Appointment indicator, Decision maker indicator and Note_Details). The notes table is a subform to my main form and is displayed like an excel spreadsheet with each note on a line by itself. Whew. What I want to do is when the notes section is updated with a new entry I want to update the ‘Follow up date’ in the main form to be the current date plus 7. When I have looked into the properties for the sub form Notes I can only see an ‘On Enter’ and ‘On exit’ sections available add coding.
Apr 26 '14 #1
1 1165
zmbd
5,501 Expert Mod 4TB
You really shouldn't store calculated values.
IN a query, you find the last record entry related to the parent record and then in a calculated field return that date.
I've said that very simplistically because we would need to know a little more about your data to ensure that you are looking at the newest entry vs. another entry.

HOWEVER, in a single Form\SubForm relationship, in the code for the subform you can refer to the Main form by using the "Parent" just like "Me." or "Me!"; thus, referring to the parent.

So, if the control on your parent form is named "followupdate"
then you can refer to it by parent.followupdate = yourvalue, be aware that you have to use the proper text.
Look at the detail section of the subform...

NOW BE CAREFULL HERE: When
Referring to Items on a Sub-Form
there is a CONTROL that acts as a CONTAINER for the actual form and it is the detail section of the actual form that you need to look at, I suspect that you were looking at the container.

BTW:
I will use this reference when I get lost trying to refer to controls within forms or from other forms:
Forms: Refer to Form and Subform properties and controls
I'm worried enough that this site might ever go down that I took advantage of the download offer of a hardcopy of the table - upper right hand corner!
Apr 26 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Tai | last post by:
Hi all I have 2 forms, frmMain and frmChild. In frmMain, I declare a variable f as frmChid then Call f.ShowDialog() I want when the child form is minimized, the Main form is also minimized...
30
by: Shannan Casteel via AccessMonster.com | last post by:
I have a subform named "sbfrmParts" with a list of parts along with the quantity and price. I have used a text box in the subform's footer and set the control source to "=Sum(*)". I set the...
1
by: Martin Williams | last post by:
I have a main form with a bound combobox. I then have another form which is accessed from the main form, which I used to update the data that is bound to the combobox. I know how to update a...
0
by: Bruna | last post by:
I'm working in vb.net 2005, and in a project we're working, we have a main form and a few other forms with different settings. One of them is User setting form with 3 settings, and one of them is...
6
by: Otis492 | last post by:
Hello, I have been struggling with this for a while. I am working on a rather simple database for claims in Access 2003. I have a table called claims that has a primary key field called Claim #. ...
8
aas4mis
by: aas4mis | last post by:
I have two textboxes in my main form that I use for default information. (purely to save keystrokes for the end user). They are txtInv (invoice number) and txtSlj (date invoiced). My subform in...
2
by: DeanL | last post by:
Hi everyone, I have a subform in datasheet view that is used to display the contents of a single table. I have another subform with a query feeding it to give a count of how many particular...
3
scootaman
by: scootaman | last post by:
I have a main form for adding or changing events called Trianing Events Details. On that form there is a subform that is tied to the Start Date field of the main form. I have the form setup this...
1
by: p4willi | last post by:
Can I send a message in continuation with this one? I have a sub form with that creates an array in the following manner: Dim i As Integer Dim Arr1() As String Private Sub...
0
by: farid121 | last post by:
I am trying to update the main form with each record in the subform. I have two tables Invoice and Payment table. The main form has the payment details which I need to update for each invoice...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.