Decimals in Drop Down Box

  • Thread starter Thread starter Dave C.
  • Start date Start date
D

Dave C.

I have a table that contains project numbers. In the table and every query
I can find, the project number is set to "fixed" and "3" decimal places. I
can not get the drop down list to display more than 2 decimals. If I go
into the sql editor, right clicks and change the decimal setting, I'm
prompted to "save the changes" but if I go back into the sql editor, the
values are blank.

Any help would be greatly appreciated...
 
If this is just for display purposes (i.e. not the Bound column of the
combo), set the RowSource of the query to something like this:
SELECT MyID,
Format([MyNum], " #,##0.000;-#,##0.000") AS MyNumFormatted
FROM MyTable;
 
I think this is the root of my problem, I don't know SQL. All the code that
I have, has been created by the "Wizards". I really have no idea of where
to put the code you listed below. I keep looking in the "EventProcedure"
but It doesn't seem to fit there, and I can't seem to find the "properties"
for the "drop down list". My event procedure looks like this....


Private Sub Find_Job_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[JOB #] = " & Me![Find Job]
Me.Bookmark = rs.Bookmark
End Sub

Thanks for your help.

Allen Browne said:
If this is just for display purposes (i.e. not the Bound column of the
combo), set the RowSource of the query to something like this:
SELECT MyID,
Format([MyNum], " #,##0.000;-#,##0.000") AS MyNumFormatted
FROM MyTable;

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Dave C. said:
I have a table that contains project numbers. In the table and every
query I can find, the project number is set to "fixed" and "3" decimal
places. I can not get the drop down list to display more than 2 decimals.
If I go into the sql editor, right clicks and change the decimal setting,
I'm prompted to "save the changes" but if I go back into the sql editor,
the values are blank.

Any help would be greatly appreciated...
 
The SQL statement goes into the RowSource property of the combo.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Dave C. said:
I think this is the root of my problem, I don't know SQL. All the code
that I have, has been created by the "Wizards". I really have no idea of
where to put the code you listed below. I keep looking in the
"EventProcedure" but It doesn't seem to fit there, and I can't seem to find
the "properties" for the "drop down list". My event procedure looks like
this....


Private Sub Find_Job_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[JOB #] = " & Me![Find Job]
Me.Bookmark = rs.Bookmark
End Sub

Thanks for your help.

Allen Browne said:
If this is just for display purposes (i.e. not the Bound column of the
combo), set the RowSource of the query to something like this:
SELECT MyID,
Format([MyNum], " #,##0.000;-#,##0.000") AS MyNumFormatted
FROM MyTable;


Dave C. said:
I have a table that contains project numbers. In the table and every
query I can find, the project number is set to "fixed" and "3" decimal
places. I can not get the drop down list to display more than 2
decimals. If I go into the sql editor, right clicks and change the
decimal setting, I'm prompted to "save the changes" but if I go back
into the sql editor, the values are blank.

Any help would be greatly appreciated...
 
Back
Top