Jumat, 27 Januari 2012

Re: [MS_AccessPros] Macro help.

 

Tom,
 
I really appreciate your assistance but I need you to walk me through this. I am a beginner to access and I am  just starting to learn about macros.  I have watched a few online tutorials and that is it and this is my first macro.
 
My Assets table has a primary key under AssetID and Unit, my Contact table has a Primary key under ID.
I have a one to many relationship established already between these tables.  The link is Contacts [ID] to Assets [DriverID].
 
Could you guide me from here?
 

Tiffany

________________________________
From: Thomas Ewald <tewald@yahoo.com>
To: "MS_Access_Professionals@yahoogroups.com" <MS_Access_Professionals@yahoogroups.com>
Sent: Thursday, January 26, 2012 8:21 PM
Subject: Re: [MS_AccessPros] Macro help.

 
Tiffany,
 
If it's a one (person) to many (assets) relationship, you would have a foreign key in the asset table that corresponds to the primary key in the person table. In this case, all you need to do is take the person's primary key and place it in the foreign key field for the asset's record in the asset table. The person's primary key is probably the value the drop down box yields when the name is clicked on. When you select a name from the dropdown, the After Update event is triggered; you enter code for this event, telling Access what you want it to do. Your pop up form should "know" the primary key of the asset in the scenario you give. You then tell Access to update the the foreign key field with the person's primary key in the record that has that asset's primary key. Hope I haven't made that sound more complicated than it is. You can create and call an action query to do the updating, or you could just write some SQL.
 
HTH,
 
Tom Ewald
Detroit Area

________________________________
From: cc0623 <cc0623@yahoo.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Thursday, January 26, 2012 6:58 PM
Subject: [MS_AccessPros] Macro help.

 

I have a form for a person, with a subform with assets in it and I created a a pop up form so when the asset (record) is clicked it opens up. In the pop up form is a drop down box with names and it shows the asset that is to be moved from the subform. Once a name has been selected in the drop down box I would like the selected asset to be moved to the new person. Now the person has an ID that is associated with the assets in a one to many relationship already established.

And here is where I am stuck. I do not know how to make the selected asset transfer to another employee. Can someone walk me through this.

Tiffany

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___

Tidak ada komentar:

Posting Komentar