DLookup Problem

shenty

Registered User.
Local time
Today, 23:09
Joined
Jun 8, 2007
Messages
119
Hi all

Its been a while since i posted and i liked to just say thanks to all the people who have responded in the past to various problems i've encountered - it's been a huge help in my learning of access programming in VBA and i find it gr8 fun......

However i now a strange problem that i don't understand so i feel the need to ask for help again.

I have attached my db and i'l explain the prob now....

Basically this db is a contacts, quotes, projects and orders db....it's a complete re-write from one i did a while ago with the intention of improving it a lot.

The problem....

In the form frmQuotes i want to select a customer to store some quote details. When the combo box for customer ID is pulled down and a customer selected i want the user to have the option of looking up the customer details and passing them to the quote table to save the user having to potentially input data again.

So far so good but it only 'appears' to be passing the CompanyName (ProjectName) data to the Quote Details bit.

After a while trying to work this out i noticed that if the mouse was hovered over the labels to the other fields LABELS it refreshed the field data !!

Very strange and i can't work out why - if anyone would be able to explain why i'm sure i'll be able to cure my problem

Thanks in advance for any assitance.
 

Attachments

Not that I would be storing redundant data, but if you feel you must, then you should just include the fields you are wanting as part of the combo box's rowsource and then use code to populate based on that, instead of a bunch of DLookups.

Just use

Me.SiteAddress1 = Me.CID.Column(x)

Where x is the column in the rowsource (zero based).
 
NOt sure i understand you Bob !

MOst of the time the customer details will be repeated in the quote details but there are also many times when the quote details are different. The reason is because we make buildings. Most are directed to our own customers but some are for other building firms without fabrication facilities.

So i need to end up with a Contacts table (with all OUR contacts), then a quotes table (related by ContactID) then a Projects table (related also by ContactID). The project table will then have a field in there for the Quote Ref (quotes are not always done) so there is a cross reference between all 3 tables.

What i couldn't understand is why the fields don't update until you hover over the labels !!

Thanks anyway
 

Users who are viewing this thread

Back
Top Bottom