furnitureheaven
Registered User.
- Local time
- Today, 15:28
- Joined
- Aug 5, 2008
- Messages
- 36
Hi,
I got stuck in the update table record. Actually I have a parent form with subform (child form) attached with two tables (Obviously one is Parent table and other is child table).
Fields in Parent Table:-
RefNo
…..
…..
Revwdate (Depend on Child table Revdate against Type)
Fields in Child Table:-
RefNo
Revdate
Type (Could be C or A or Null)
…..
I want in Event Action (Don’t know what event it would be), It should check the “Type” Field in Child table and if its found Type “A”, it should update Parent table “Revwdate” field with Child table “Revdate” (if there are multiple A types, should update with first A) of that appropriate Ref No.
e.g
Update parent table Set Revwdate=(select Revdate from Child table Where Type =First A)
And if it found Type C then it should update Revwdate with Child table “Revdate(Last Record)” of that appropriate Ref No.
e.g
Update parent table Set Revwdate=(select Revdate from Child table Where Type =Last C)
And if there is no Type then should update with first Revdate in child table of that appropriate Ref No.
This is really impossible for me to work it out, so I hope somebody can help me on this.
For detail view I have attached a sample project.
Thanks.
I got stuck in the update table record. Actually I have a parent form with subform (child form) attached with two tables (Obviously one is Parent table and other is child table).
Fields in Parent Table:-
RefNo
…..
…..
Revwdate (Depend on Child table Revdate against Type)
Fields in Child Table:-
RefNo
Revdate
Type (Could be C or A or Null)
…..
I want in Event Action (Don’t know what event it would be), It should check the “Type” Field in Child table and if its found Type “A”, it should update Parent table “Revwdate” field with Child table “Revdate” (if there are multiple A types, should update with first A) of that appropriate Ref No.
e.g
Update parent table Set Revwdate=(select Revdate from Child table Where Type =First A)
And if it found Type C then it should update Revwdate with Child table “Revdate(Last Record)” of that appropriate Ref No.
e.g
Update parent table Set Revwdate=(select Revdate from Child table Where Type =Last C)
And if there is no Type then should update with first Revdate in child table of that appropriate Ref No.
This is really impossible for me to work it out, so I hope somebody can help me on this.
For detail view I have attached a sample project.
Thanks.