corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Simple Access Question


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Simple Access Question
Mikorsa16v
Member

Registered: 2nd Sep 02
Location: Burgess Hill, West Sussex
User status: Offline
   11th Jun 03 at 15:41   View User's Profile U2U Member Reply With Quote

I am currently making a database part of a group with a C++ program to gather data and it to write to the database, i figured that bit out but there is summit simple gettin on my tits now

i want a person to input a number i.e. 27 and then the field will change it to 27%, the percent format only allows numbers to be entered as a decimal i.e. 0.27 then this changes to 27%. so as it is set to the percent format, if i enter 27 it changes it to 2700% Grr ive pissed about with number formats, text formats.
i hate access

[Edited on 11-06-2003 by Mikorsa16v]
Gambit
Member

Registered: 5th Jun 00
Location: Common Sense HQ
User status: Offline
11th Jun 03 at 15:54   View User's Profile U2U Member Reply With Quote

leave it as a decimal field, then when they put in 27 it appears as 27 (and a label % beside the field), but when you store it in the db you divide by 100, to keep it as a percentage

then when you retrieve it again you multiply by 100 so it appears as 27
Mikorsa16v
Member

Registered: 2nd Sep 02
Location: Burgess Hill, West Sussex
User status: Offline
11th Jun 03 at 15:55   View User's Profile U2U Member Reply With Quote

thats gambit, thats the theory i had, but im not sure how to divide it, its really helpful feature of putting quote marks in when i put /100 etc, isnt helpful! cheers i shall play a bit more :/
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Online
11th Jun 03 at 19:08   View Garage View User's Profile U2U Member Reply With Quote

This won't help but bear in mind if you're playing about with numbers in C++ you'll need to cast the variable as of course you can't do maths on a string.

Sounds like you need a little macro to take the value and overright itself with the result of the division. I'll speak to our Access man in work if you're still stuck tomorrow.
baza31
Member

Registered: 19th Apr 03
Location: yorkshire
User status: Offline
11th Jun 03 at 19:51   View User's Profile U2U Member Reply With Quote

How about puttin "0." in there allready
so when sum types 50
it wil be 0.50. just a thought
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Online
11th Jun 03 at 19:57   View Garage View User's Profile U2U Member Reply With Quote

Trouble with that baza, it'll be overwritten when the user types the 50 in. Plus it would need to be concatonated on, which is a string operation, which I don't think it'll let you do.

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Amp question Aussie GSi Help Zone, Modification and ICE Advice 10 1519
13th Mar 03 at 05:52
by ultim8DTM5
 
Question regarding two wireless access points Steve Geek Day 2 1308
25th Feb 07 at 19:00
by Aj.
 
Wireless LANs (not an ordinary question) Aaron Geek Day 20 1216
1st Nov 07 at 18:35
by James_DT
 
LAN Network + wireless/wifi Jambo Geek Day 8 1021
10th Nov 07 at 21:55
by pow
 

Corsa Sport » Message Board » Off Day » Geek Day » Simple Access Question 29 database queries in 0.0102661 seconds