View Full Version : I want to add a field from a different table to a form


rgeinosky
09-05-2008, 09:23 AM
The field will be for information only. It is a 4 digit year field (numeric) so the the Switchboard will the present fiscal year and next year (fiscal year + 1) At one time I could do this but I forgot how. I believe it should be something like =[my info].[fiscalyear] (=[tablename].[fieldname]) in Control Source. -------------- I was able to find the answer, use DLookup() include field name and table name and enter it as Control Source in an unbound text field on a form.

Pat Hartman
09-05-2008, 06:56 PM
You can use DLookup() in the Load Event of the form.

Me.FiscalYear = DLookup("FiscalYear","sometable", "somecriteria")
Me.NextFiscalYear = Me.FiscalYear + 1

rgeinosky
09-05-2008, 07:12 PM
Thanks

Bob