Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change Row Source

Status
Not open for further replies.

Jamie2002

Technical User
Sep 17, 2001
62
0
0
GB
I'm trying to write code to change the row source of a list box.

On another thread is shows that the SELECT statement needs to be enclosed in " ".

Half way along the code is a format(field1, "#,##"), I am getting an error because access expects the code to end after the first " in the format expression. Is there any way around this or will I have to make 3 queries based on the different option selected and then do rowsource = "Query1" , "Query2" etc.

Thanks.

Jamie. Thanks

Jamie
 
Try using single quotes in your format function:


format(field1, '#,##')


If that doesn't work, I'd try this:

format(field1, '" & #,## & "')

 
Single quotes it is......Thanks. Thanks

Jamie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top