David McAfee
davidmcafee at gmail.com
Fri Aug 27 13:01:05 CDT 2010
I just experienced something similar in an ADP report that I converted from an MDB. The MDB's report was displaying Quantity and Incentive correctly, where the ADP's report was displaying quantity with 6 zeros and incentive with 4. I tried formatting in the report, converting in the SQL procedure with no change. Finally, I was able to fix it. I didn't create the original report (which I simply imported in the ADP and changed the recordsource). It turns out that I needed to change the field names in the report to txtQty and txtAmount. I then set the Control source for txtQty to: =CInt([Quantity]) and I set the control source for txtIncentive to: =CDbl([TotalIncentive]) Works like a charm now. On Fri, Aug 27, 2010 at 9:25 AM, Steve Turner <sturner at mseco.com> wrote: > Thanks Charlotte, > It was an unbound text box. There seems to be no " text selection" for properties in the selection under properties for a text box. The field I was writing to was a text field in a table all its own. I went back and changed the report query to ask for the number upon hitting the print button. The original reason I set up a small table was to have the VB programmer write to it when someone created a job on our timesheet program so I could then hit a print button when I completed the form and wouldn't have to key in the job again. Something I want him to add when we make any new changes to the program. Its just a little time saver. This timesheet program has been a work in progress for over 10 years. Originally written in Dbase and moved to VB6 with Access tables now SQL express tables. In Access we have a form called Business Control Center that we put lots of Command buttons on to run various reports we use. The VB code for our timesheet program is over 600 pages printed out. Lots of lines of code. > We ran into this zero dropping thing before. So I was looking to see if it was just us or this is the way Access works. > > Steve A. Turner > Controller > Mid-South Engineering Co. Inc > E-Mail: sturner at mseco.com and saturner at mseco.com > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust > Sent: Friday, August 27, 2010 10:07 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Droping trailing zero > > Fixed and 2 decimals is a numeric format for *display*. If you write > a numeric value, it isn't controlled by display properties. If you > enter a number, it tries to write a number, hence the dropped zero, > since the decimal point makes the zero unnecessary for numeric > handling. If you don't enter a decimal, the entire number entered is > significant, so it writes it. > > This gets more confusing with every reply. Are you sure the field is a > text field? The behavior you're describing is distinctly numeric. If > the field is bound, it should behave according to the datatype of the > field. > > Charlotte Foust > > On Thu, Aug 26, 2010 at 1:58 PM, Steve Turner <sturner at mseco.com> wrote: >> Hi Stuart, >> The NewJobNo table is in Access mdb >> We link in all the SQL tables with ODBC. I will probably change the >> report query to an expression that I have to key in at time of >> generation. I can see on the properties tab for the text box that there >> is also no plain text selection. Strange though that if you set it to >> Fixed and 2 decimal places it won't write that to the file as text >> without drooping the last zero's. If I don't put the period in there it >> will write it. >> >> Oh just tried the Job = txtNewJobNo.value you suggested. didn't work >> either. >> >> Steve A. Turner >> Controller >> Mid-South Engineering Co. Inc >> E-Mail: sturner at mseco.com and saturner at mseco.com >> >> > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >