Populate related fields in Pop-Up

zym1ne

Registered User.
Local time
Today, 23:38
Joined
Jul 25, 2003
Messages
34
Hi there once again folks...

Bit of a prob here thats stumped me for some time and hope I might find some help from out there :)

I have 2 forms

1. frmAdminDetails: dealerID (PK), AdminNo (auto#), Date, Type,
Details, Resolution and Status.

2. frmAddPC : dealerID (PK), Client, PCSetup, OpSys, ISP

the dealerID field is an indexed unique field within my Main Tbl Dealers which holds all the Dealer Info.

when I have entered all the details in frmAdmin I click on a cmd button which brings up the frmAddPC.

What I've tried to acheive (without success) is when the frmAddPC opens it's dealerID and Client fields are auto populated by the dealerID field of frmAdmin...?

so when i have tried I can neither get the Client field filled or I can fill the dealerID field of the AddPC form but then it will not enable me to edit it or add the entries to my tblAddPC.

Both forms are based on respective tables tblAdmin and tblAddPC thier dealerID fields are in relation to my main Tbl Dealers.

If this has made any sense I would realy appreciate any assisstance that can be offered asit's driving me crazy :(

many thx

Zym
 
Zym,

Make their default values:

=Forms![frmAdminDetails]![TheControlYouWant]

Wayne
 
1. Use the where argument of the OpenForm method to filter to PC form by Dealer. Also, pass the DealerID in the OpenArgs argument.
2. In the BeforeInsert event of frmAddPC, place the DealerID in the new record -
Me.txtDealerID = Me.OpenArgs
3. Set the enabled property of the DealerID in frmAddPC to No to prevent a user from accidentally changing this value.
4. The pk of the tblAddPC should be an autonumber rather than DealerID to allow a dealer to have more than a single PC.
 
THanks for the help folks...

Hi there once again folks...

Just come on and have to say big thanks to you both Wayne and Pat for the pointers.

I'm a bit useless at present with VB but will give them a shot and let you know how things work out.

Once again thanks for the help, and has to be said this forum easily the best out there!!!! ;)

zym
 

Users who are viewing this thread

Back
Top Bottom