Tak Terry kan ikke lige se hvordan de guides løser mit problem men kigger på dem sener tror jeg har stiret mig helt blind lige nu.
Var måske lidt upræcis
Har en kombo box der lister alle veje(vejnavn) og gemmer vejnr ved valg. Men den gemmer kun sin egen værdig og ændre sig ikke efter hvilken post(Aftale) er åben i formen.
If you have created your tables/relationships correctly then the contents (selected value) of the combo will change when you navigate through the records showing the value that was chosen when the record was created.
I assume that this is what you want to do?
Yes and no I wanted a box without relation to post info to be updated with current post data.
Trouble is I have a tables
Roads
RoadID
Name
Adresses
AdressID
RefRoadID
hus no.
Agreement
AgreementID
RefAdressID
StartDate
EndDate
I am making a new form to create/edit (new) agreement and I want a field where you write road name and select it then select an address from table Adress' showing only the address' related to the specific road.
All codding for select and such is working flawlessly only trouble is the field with Road name is keeping it's value when you change between posts (moving between different agreements) would like it to write name of the current road in the search for road name field. (Road name related to the address currently associated with agreement viewed)
As I am relating agreement to address' and not to a road directly. And I would like writing a road name/searching for a road not to affect current post before you change relation to a specific address.
Currently best I've been able to is put a field writing road name associated with currently shown address in a field trouble is this field is linked I would like to avoid this link and still get the road name displayed.
So what you want to do is display the specific Road depending on the contents of the address combo?
In the on Current event you need some code which displayes the correct road information in the road combo. Something like this.
Me!cboTest2.Value = Me!cboTest2.ItemData(0)
Yes excatly Terry. Thanks