I have a form which has an "unbound" text box where the format in properties is empty (only options I get is for date / time or numbers). I put in a value in this text box on the form lets say 1234.
I then start filling in the other boxes in the form, one of them which is trailer number, when enter is pressed in this box, the cursor goes to a new line and the trailer box is auto populated with the value from the text box (as above 1234).
I then have a button which opens a report, which goes into a table and returns all records where the trailer number is equal to the value I put in the text box (in this example 1234), this works fine.
However instead of 1234 I put in a car reg number i.e. AC33 555, the auto population bit works, but when I click on the button to open the report, a parameter box appears with the label (in this example AC33 555). I cant understand why it wouldn't do it when I have numbers only, but when I put text and numbers it comes with a parameter box.
FYI, the trailer field is short text within the table, the code to open the report (on click)
Code:
strWhere = CStr(Me.Text52)
DoCmd.OpenReport "RPT Load Manifest", acViewReport, , "Cstr(trailer) = " & strWhere
so to summarise, if I entered 1234 in the text box and lcicked on open report it works, but when I put a car reg i.e. AC33 555 (have tried without the space, it doesn't.
Many Thanks in advance for your time.