Topic: Real/currency values in Grid

This is very strange.

I have a grid displaying records including one column named 'Cost'.

The field is of type "Currency". In my form i can type in 166.00 an save the record. When returning to det grid it diplays 0.00 instead of 166.00??
If i type in 166.00 and search for it, it display the values correct in the same grid. What am i doing wrong?

I have included three pictures explaing the above.
Pic1 - The grid with columns and search bar.
Pic2 - My main form
Pic3 - The search result.

Post's attachments

Attachment icon Cujos.jpg 742.19 kb, 118 downloads since 2019-02-03 

Re: Real/currency values in Grid

Hi Cujos,
If you attach your project (zip it without the 'exe' file), then I can take a look if you want.
Derek.

Re: Real/currency values in Grid

Hi, Thanks for your answer... And it sunday and everything. You are doint a great job.

Ok,


The language in the application is swedish, so i hope you can understand the meaning In spite of that.

The file was to big to upload so....
Ekonomi.zip - 5.0 MB

4 (edited by derek 2019-02-03 23:10:51)

Re: Real/currency values in Grid

Hej Cujos,
I think it might have been because of how your filters were set up.  You don't need 'tablegrid1' as a filter criteria (see screen shot).  I added / changed a few records as a test and it seems to be fine now.
There are also a few things in your program that perhaps could be done differently which might make it  a bit easier for people to use and for you to maintain.
If it would be any help to you, just let me know.
Derek

Post's attachments

Attachment icon ekonomi.jpg 166.29 kb, 126 downloads since 2019-02-03 

Re: Real/currency values in Grid

Hi again Derek...

Sorry to say, i can´t get it to work. The only time i can see the value is if i do a search and de grid generated from the search-button shows it.
all other grids show '0.00'

It seems like there is some old fields an values in the database. If i sort the column named "Belopp" the one vith 0.00

Is there a tool for cleaning up the database?

A strange thing is, if i sort the column with the '0.00' the '0.00' does not show up together as they should.It seems that there is some old values or referenses sorted in the column.

I remember that i did a misstake earlier. I changed my cost-field from REAL to CURRENCY and i think it stopped to work after that.
Maybe som inconsistensy with fieldname and/or control names.

I am sure there is a lots of things to do in a different way, but i am a newcommer spendig approx 10-15 hours with the program, so....
I am waiting to get warm, and ivé seen the potential in software. I like it very much. You have made a greate job.

Cujos

6 (edited by derek 2019-02-04 14:29:47)

Re: Real/currency values in Grid

Hi Cujos,
I can't recreate it on my PC;  maybe lots of changes to the different forms and tablegrids you are using has caused the problem (although it SHOULDN'T) .
To try and solve the problem, I took your application and re-worked it.
1.  Now all of your information is filtered using the same tablegrid (you can still select more than one 'type' by using 'multi-select').
2.  Because you now do this all from 'Form1', I have deleted forms that are no longer needed;  this should make everything a bit quicker.
3.  I have added tablegrid footer totals so that you can see the effect that using filters has on the number of rows displayed.
4.  All of your searches now use 'wildcards' (%s%) and are interactive so the 'search' button can be hidden.
5.  Each 'search' fields is aligned above the column that it relates to (perhaps visually more logical?) and each search field has a 'hint' on it.
6.  Your look-up tables (for Kategorier and Typ) now use 'editable grids' and can be set up with 1 form (instead of 4).
7.  If you store images in the application, it quickly gets very large and might slow down so on 'inputform' I have changed 'storefile' to 'linkfile';  your documents are stored in a folder called 'documents' located within the 'ekonomi' folder (but it can be anywhere you choose).
Can you try running this version and let me know if you still have the same problem when adding values.  As the folder is too large, please download it using this link:  https://app.box.com/s/88tqeta1beleirmue9pdzj0py5g3ah6n
All of the above points are just suggestions - there is no 'correct' way to do things.
By the way, what version of My Visual Database do you use?
Regards,
Derek.

Re: Real/currency values in Grid

HI again, Derek

Thanks for some greate tips...

But the main problem still exists, i only have '0,00' in the cost column.
The strange thing is, If i use the typ-ahead search it finds my values???

I think i start from scratch with a new application...

Re: Real/currency values in Grid

Hello Cujos,
Can you try downloading this again and see if it works?  https://app.box.com/s/10uz426r6pbad3mwzrhxl579udp4xkvx
I've made one more change (deleting and then re-creating your mainform.pay search field). 
If that doesn't work, then I'm afraid I can't think of anything else to check.
Derek.

Re: Real/currency values in Grid

Hi, again Derek.

As a said i started to rebuild the application it from scratch. I´m just about ready and now everyting works fine.

So i think we can stop wasting time on that old application. I must have made som errors when it was developed.

Thank you so much for your help, much appreciated....

There is a big "risk" that you will hear from me again :-))

Cujos