A default selection in a ComboBox

SilverFox4me

Registered User.
Local time
Today, 04:53
Joined
Sep 11, 2007
Messages
13
Having just entered a Suppliers details in a table that has the usual fields,

SupplierID [autoNumber]
SupplierName [Text]
SupplierAddress [Text]
etc

I now need to enter a Products details in a table,

ProductID [autoNumber]
ProductName [Text]
ProductSupplierID [Number]
etc

The Supplier of the Product is selected by using a ComboBox, using RowSource...
SELECT DISTINCT [Suppliers].[SupplierID], [Suppliers].[SupplierName] FROM Suppliers ORDER BY [Suppliers].[SupplierName];


Is there any way the ComboBox can default to selecting the last SupplierID that I've just previously created, ie the last record of [Suppliers].
 
Thanks Pat, I think the global variable is the answer I'm looking for but I don't know if you or anyone else is up for a bit of hand holding, I'm a right novice. Since your suggestions I have searched the Threads and found similar problems but the answers aren't explained at my level.

How would I store the last SupplierID record as a global variable?

Also...

I note that the BeforeInsert event is within the properties of the Form so how do I populate the ProductSupplierID combo box with the global variable (SupplierID)?
 
Thats working a treat for me... thanks
 

Users who are viewing this thread

Back
Top Bottom