Full Version: data based on table on a form
UtterAccess Forums > Microsoft® Access > Access Forms
hi, i have a parameter table that contains general info of a branch, like address, telno, branchcode, etc.. i want this info to appear on my form as labels, (like the address on the top portion of the form) my purpose is i can just edit my parameter table everytime i install it on a new branch. how do i do this?
ks in advance.
Create a table, perhaps named SystemParameters. Give it an ID field and set its Default Value to 1 and its Validation Rule to =1. This prevents the table from ever holding more than one record.
How add fields to store values for this location.
In your form use the form's OnLoad() event to retrieve the values and set the .Caption property of the appropriate Label control:
Private Sub Form_Load()
  Me!lblCompanyName.Caption = DLookup("[CompanyName]","SystemParameters")
End Sub
Hi John
Thank you so much for the very quick reply, its working now! cheers! o!
Glad I could assist!
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.