Filling Text Boxes (1 Viewer)

Wayne_Ells

New member
Local time
Today, 09:18
Joined
Jun 16, 2023
Messages
2
Hi,

I need help populating a bunch of text boxes on a form.

Form has a table tied to it, 'LglData' so that when I change the record selection it updates the bottom
quarter of the form 'All_Info' This form needs to display data from 3 other tables (OccData, OwnData, PrkData).

When a record is selected by the record selection buttons on the bottom of the form, I want all the empty text
boxes to be filled by VBA (tried using DLookup but got no where).

Any insights or help are appreciated. Also, can't seem to get the Immediate window to function. Not sure why that is.

Thanks in advance for your assistance.
 

GaP42

Active member
Local time
Tomorrow, 01:18
Joined
Apr 27, 2020
Messages
338
As a form tied to a table (lgldata), and requiring other data to appear from three other tables, are these subforms or 3 single text controls that you want populated by DLookup functions? If Dlookup - provide information stating the field you need, its source, and how it is selected based upon the value in your form: what control, what datatype - in the control and the source? Are the record selection buttons referred to the usual record navigation control default by default on forms?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 11:18
Joined
May 21, 2018
Messages
8,529
sounds like you need a main form with multiple subforms.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:18
Joined
Feb 28, 2001
Messages
27,187
First, I totally agree with MajP's direct suggestion and GaP42's suggesting in passing on this. If you aren't working with related subforms, you should be.

Second, if you don't take MajP's advice or GaP42's or mine, or if you can't because the three other tables aren't actually related, the place to do this is in the main form's OnCurrent event and would involve a series of DLookup calls. I have no idea why you couldn't get that to work without more information on the code you used and the context in which you used it.

Third, please clarify the context in which you expect to get the Immediate window to do something.
 

Users who are viewing this thread

Top Bottom