Right justify entry for varchar data type : (



Hello everyone, I'm using Access 2000 and SQL 8.0

This maybe easy but I can't figure it out. I have a linked access
table to a SQL server table. I use this table on a Grid on an Access
form. There is a field on the grid for the Equipment Number the field
is called Equipment (I know original).

The data type for this field is varchar with a length of 10 and the
data is rigth justified in the table
on the SQL Server.

The grid is only for doing edits (no new records can be added). When
the user changes the Equipment number on the grid I need that data to
be right justify with spaces on the left. Now you can manually enter
spaces in the textbox first and then enter the number but that's not
realistic to ask the user to do that. The way it is now if the user
just enters the number when the change hits the Equipment table the
number is Left justified which is an invalid Equipment Number.


Anyway to have spaces padded to the left with code. I tried this on
the before update event but Access did not like it Me.Equipment =
Right(" " & me.Equipment, 10). I got an error message saying
that the code was preventing me from updating the record.

Any help appreciated-----thanks

.



Relevant Pages

  • Re: Power Grid Freq Variations To Be Allowed
    ... equipment that was using the frequency of 60 Hz power line to control some ... If alternators running in parallel ... produce a pretty loud squeal from the complaining equipment. ... Northeast Blackout in 1964 was not simply that some parts of the grid had ...
    (alt.home.repair)
  • Re: Too many rows output by query
    ... Yes Jeff, to me last means most recent. ... I had a vague recollection of right clicking the grid and I ... |> FROM Equipment INNER JOIN Movements ON ... |> How should I change the code to ensure only the latest movement record ...
    (microsoft.public.access.queries)
  • Re: OT-Hacking smart meter possible?
    ... to that segement of the grid? ... modification of customer owned equipment. ... hardware. ...
    (alt.machines.cnc)
  • Re: local temp tables
    ... statistics, constraints, etc. to pass to the optimizer when the inline ... trying to say that MS SQL Server stinks and cannot handle CTE choices ... Richard found one published grid with 250+ valid answers! ... you said that you could write a better Sudoku query in five minutes ...
    (microsoft.public.sqlserver.programming)