General discussion

Locked

Access 2000 VBA Question

By MRA2 ·
I have a report and I want to set several Form Properties. I can set all of the properties EXCEPT Orderby See my code below:

Me.Label6.Caption = "New Clients-Holocaust Survivors (Numerical)"
'Me.OrderBy [CLIENT_ID]
'Me.OrderBy = "[CLIENT_ID]"
Me.OrderByOn = True

What am I doing wrong???

Thanks,
Alan

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by timfox In reply to Access 2000 VBA Question

Me.Label6.Caption = "New Clients-Holocaust Survivors (Numerical)"
Me.OrderBy = "CLIENT_ID"
Me.OrderByOn = True

What you're actually doing is applying a string expression/value to the OrderBy property of the report's OrderBy property - which is the name of the value (not the text box) that is being ordered.
You could also use:
Me.OrderBy = "CLIENT_ID ASC" (defaulted to ascending anyway)
or
Me.OrderBy = "CLIENT_ID DESC"

Collapse -

by MRA2 In reply to

Thanks for your quick & helpful response! Alan

Collapse -

by MRA2 In reply to Access 2000 VBA Question

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums