Hi!
I wonder how to autofill a few fields when I register a new “Timeregister”
So I have two tables.
Table 1
Costumers
|Timestamp|Costumer|Adress|Phonenumber|Type
Timestamp is Key and hidden
This table I fill in new costumers manually
Table 2
Timeregister
|TimeStamp|Date|Costumer|Adress|Workedtime|Type| and a few other columns
So when I create (Add) a new Timeregister this happens
Timestamp = Key (HIDDEN)
Date = fills automatic “Initial value = now()” (WORKS, no problem)
Costumer = List taken from Costumer table, dropdownlist (WORKS, no problem)
Adress = This I have a problem with, wants this field to autofill from “Costumers[Adress]” when I have choosed Costumer
WorkedTime = I fill in manually
Type = This I have a problem with, wants this field to autofill from “Costumers[Type]” when I have choosed Costumer
Other Columns I fill in manually
I hope you understand what I am after
Edit: I am pretty new to programming so please go easy on me
Thanks
Hi, you can use dereference, from the table timeregister create new column, named [customersID] , then make it ref to table timeregister.
[Address] column expression will be : [customerID].[Address] the same with other…
I have tried to reference but I get confused and never get it to work.
The New column 'CostumerID", do I make it in Costumer table or timeregister table?
I assume it should be a unique idnumber, does it need to be key?
Hi sorry, my bad It should be “from the table timeregister create new column, named [customersID] , then make it ref to table customer”
User | Count |
---|---|
43 | |
32 | |
25 | |
23 | |
14 |