amend records in subform with control on main form (1 Viewer)

emcf

Member
Local time
Today, 11:58
Joined
Nov 14, 2002
Messages
209
Hi Folks

it has been a while since I've been on this site and I have a daft question for you access pros out there!

I have a DB (purpose is to record projects and those working on the projects). I have a main form which shows the projects and details and the subform shows the staff members working on the projects.

I have a button on the main form that closes the project and removes it from the open list of projects - when i click this button I want the some fields in the subform records to be updated/filled in - how would i go about this?
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 11:58
Joined
Jul 9, 2003
Messages
16,358
I want the some fields in the subform records to be updated/filled in - how would i go about this?

I will assume that you mean: I want some fields in the.....

As opposed to the alternative interpretation: I want "Sum" fields in the....


I am assuming that you will have a private key in your main form, and a FOREIGN KEY In your subform.

If that's the case then you can run an SQL statement from a command button on your main form that will adjust the particular record(s).

The first step would be to use the ID number present on the main form, (the private key) to develop a select query which returns the list of records you want to affect.

Once you have successfully created this query, then you can change it into an update query.

You should be able to find topics within this forum that explain how to run an SQL statement from a command button, however if you need any further advice please come back.
 
Last edited:

emcf

Member
Local time
Today, 11:58
Joined
Nov 14, 2002
Messages
209
thanks uncle gizmo - you are correct in both your assumptions.

I'll have a dig about on those topics and will repost if (when!) i have any more questions.
 

emcf

Member
Local time
Today, 11:58
Joined
Nov 14, 2002
Messages
209
Thanks Again Uncle Gizmo, job now done!
 

Users who are viewing this thread

Top Bottom