DataBase - variable field width
Asked By John D.
21-Nov-09 04:29 AM
I need to display client name and associated address information. There are
three rows of data which are taken from the contacts table.
The field boxes are all fixed in width, I want to make the width dependant
on the data length, and if the field data are short, the boxes would leave no
extra white space.
I may have several field boxes in a row, and I would like the boxes to go
right next to one another without spaces, so each field box position is
anchored to the end of the previous field box.
How would I implement this?
John.
ZipCodeField
(1)
StateField
(1)
CityField
(1)
TextBox
(1)
City
(1)
Rick Brandt replied to John D.
If this is only for *display* then just use an expression in each of three
stacked TextBoxes that span the length you need for all the data on a row.
The TextBox will not change width, but the data will always be right next to
each other.
Example expression for City, State and Zip...
=[CityField] & ", " & [StateField] & " " & [ZipCodeField]

someone please help. Thank you Dimitris Access Queries Discussions VBA (1) FGetCityName (1) AddressField (1) CityField (1) CityName (1) AddressTable (1) October (1) IPos (1) hi Dimitris, it is basically a IPos+1)) End if End Function Your update query might look like UPDATE [SomeTable] SET [CityField] = fGetCityName([AddressField] WHERE [AddressField] Like "*[0-9]*" AFTER you have populated the city field, you name. Perhaps something like the following. UPDATE [SomeTable] SET [AddressField] = Left([AddressField], Len([AddressField])-Len([CityField])) WHERE [AddressField] LIKE "*" & [CityField] John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore
that I only end up with the records containing that city. TIA Access Queries Discussions CityField (1) EHY0qdh (1) Chicago (1) Newb (1) City (1) WHY? As in why do you the records using a delete query. The query would look like DELETE FROM SomeTable WHERE CityField Not Like "Chicago*" John Spencer Access MVP 2002-2005, 2007-2008 The Hilltop Institute University
Thanks Access Forms Coding Discussions VBA (1) FindFirst (1) Pennsylvania (1) Nomatch (1) Listbox (1) Statefield (1) Subform1 (1) That's not a sort problem. Presumably the records are already sorted navigate to the first record with the selected state: With Me.subform1.Form.Recordset .FindFirst "statefield = '" & Me.thelistbox & "' " If .Nomatch Then Beep End With - - Marsh MVP [MS Access] Thanks for the