Data Squashing up... (1 Viewer)

Gaztech

Member
Local time
Today, 14:50
Joined
Jan 5, 2021
Messages
39
Hi Everyone.

I'm very new to Access but am gradually getting to grips with it.

I have a form that calls data from another table and places it in a field on my form using DLookUp.

The data is being fetched correctly but when it arrives is gets squashed to the far left of the field window. I want to add a space before the data is displayed so that it looks better. Seems like a simple thing to do but I can't find out out to do it?

Dlookup command I'm using is formatted like this:

=DLookUp("[DESC]", "[SUBASSY]", "[SUBASSY_REF] = ' " & [SUB_ASSY_REF] & " ' ")

This retrieves a value of DESC (a description) from the SUBASSY table based on the value that is on my form in field SUB_ASSY_REF that matches SUBASSY_REF in the SUBASSY table.

Somehow, I want to add a space character so that the output gets the space before it outputs the data. How do I do this as I don't understand how you "control" the data coming in...
 

Gasman

Enthusiastic Amateur
Local time
Today, 13:50
Joined
Sep 21, 2011
Messages
14,234
= " " & DLookUp("[DESC]", "[SUBASSY]", "[SUBASSY_REF] = ' " & [SUB_ASSY_REF] & " ' ")
 

Minty

AWF VIP
Local time
Today, 13:50
Joined
Jul 26, 2013
Messages
10,368
It is probably better and easier to simply add some padding or a margin to the control that displays it.
1609863107587.png


That way if you need it anywhere else it won't be different to your stored data.
 

Users who are viewing this thread

Top Bottom