Topic: "Not a valid integer" error
Hello,
I am getting the above error when I click Button1 in the form AA_003_Participants. What is going wrong and how to overcome it? Please help.
My Visual Database → General → "Not a valid integer" error
Hello,
I am getting the above error when I click Button1 in the form AA_003_Participants. What is going wrong and how to overcome it? Please help.
One more issue is with tablegrid header. On launching the app, the headings in the tablegrid are skewed towards left and there are extra empty columns on the right. How to fix this?
Regards,
Eyeman
One more issue is with tablegrid header. On launching the app, the headings in the tablegrid are skewed towards left and there are extra empty columns on the right. How to fix this?
Regards,
Eyeman
Hello eyeman303,
The header issue is fixed with script, and the error is caused by trying to add items with relationships without selecting the item it is related to. If you create the project then you must enter the project name before adding the participants.
If you want to add a contribution then you must have selected a Participant name. If not then it doesn't know which Participant to associate the contribution with.
I have made a couple of modifications to your project to help get you started.
1. I set two of your database fields to Not Null to prevent your integer error
2. I enabled the script and put some examples for you to be able to use to fix your column widths.
I hope this helps.
If not then there are awesome people on here that will help you out. Good luck!!!
Hello sdhale29,
Thanks a lot. You have explained clearly and made my concepts better. Your modifications have made the app work perfectly. One thing I would like to know, whether it is possible to fit the tablegrid header to the tablegrid width, regardless of the number of columns?
Regards,
Eyeman
Hello sdhale29,
Thanks a lot. You have explained clearly and made my concepts better. Your modifications have made the app work perfectly. One thing I would like to know, whether it is possible to fit the tablegrid header to the tablegrid width, regardless of the number of columns?
Regards,
Eyeman
I have attached a project with two examples.
Form1 is for single column
Form2 is for multiple columns
Hi sdhale, eyeman,
There are also options for autosizing columns depending on the column header, the data in the column, or both, which might be of help with your project. Please see the attached (pinched from sdhale - sorry!) for examples.
Derek.
Hi sdhale, eyeman,
There are also options for autosizing columns depending on the column header, the data in the column, or both, which might be of help with your project. Please see the attached (pinched from sdhale - sorry!) for examples.
Derek.
Derek y'all are way better at this than I am. Take over any time. I appreciate you guys
Hello Derek and sdhale,
Great solutions. Learning is a joy when teachers like you show the path. My table grids will definitely look better now.
Thank you,
Eyeman
Hi,
I am facing 2 more problems.
1. A script error appears while trying to define column widths according to data.
2. Search button (Button1) in the form DB_003_Contacts is not working.
Please help.
Regards,
Eyeman
Hi,
I have figured out the script error. There was a duplication of procedures. Corrected the same. Still problem 2 persists.
Regards,
Eyeman
As far as I can tell, the search button on form db_003_contacts is working okay.
I suspect you've only done a basic test with a record that has only skype and/or email contact details which are held on AA_001_Classmates.
Since your search button is defined to use AA_005_Phone_No as its starting table for the query, it's obviously not going to find anything (as no record at that point exists in AA_005_Phone_No!).
I notice that you are using calculated fields to shuttle the email and skype details across to AA_005_Phone_No but again, this will only work if the relevant record in AA_005_Phone_No already exists.
A further issue is that the combobox list enables you to select a record from AA_001_Classmates even though there is no associated AA_005_Phone_No record. Is that how you want it to work?
Also, I'd advise ticking the 'allowgrayed' option for your checkbox otherwise the query won't work exactly as it should, but it's up to you.
Add phone and/or whats app details and the query should start working.
It is however, a bit confusing to me why you are holding contact details in different tables (among other things).
As always (and this isn't an MVD issue), if your data structure is not optimal, you are just storing up problems and complexity.
Derek.
Hello Derek,
Thanks again. Initially the query worked but then it stopped working in spite of the table AA_005_Phone_No having data. All were Phone numbers with WhatsApp ticked. I removed the checkbox from the search query and now the query works.
I moved the email and skype to the table AA_005_Phone_No and this removed the need for calculated fields. I added email and skype fields in the form AA_005_Phone_No. However,I am concerned that, if a person has 2 phone numbers but 1 email, the second record will have a null value in the email field.It was for this reason, only phone numbers were stored originally in the table AA_005_Phone_No and e-mail/skype in the table AA_001_Classmates.
One more doubt. There is a maximum of 12 image database files per person. If there are 100 classmates and 1200 images, how would the app run? Linkfile option may not be viable here, as the app need to be shared.
Regards,
Eyeman
Hi,
I thought the issue of multiple phone numbers and/or multiple whats app IDs might have been the reason for your AA_005_Phone_No table. But by the same logic, isn't it possible for someone to have multiple emails and skype IDs (I do!).
Perhaps an option might be to have, instead of AA_005_Phone_No, a more general purpose "Contacts" table with a lookup to a "Contacts_Type" table (landline, mobile, skype, whats_app, email etc) which would allow you to have none, one or multiple contact details of any type held in "Contacts".
But I don't know how well that may or may not fit in with what you've already done.
I would definitely be holding images outside of the application using the linkfile option. If the app is shared, wouldn't you just link to images in a folder on a shared drive?
Derek.
Hello Derek,
I have understood that it's the right way to do it. I have changed the tables and forms accordingly but now "List index out of bounds(3)" error crops up, while trying to search in the form DB_003_Contacts.How to correct it? Please help.
Regards,
Eyeman
In DB_003_Contacts, your search button selects 3 columns to output to the tablegrid.
But in your script (line 62) you are still referring to a 4th column that no longer exists.(which causes the 'list index out of bounds' error (see attached screenshots)).
Derek.
Hello Derek,
I cannot thank you enough! I have made the correction that you highlighted so precisely and the app is now working perfectly. I have also made a folder for all the photos in the programme folder itself and linked all photos.
Regards,
Eyeman
My Visual Database → General → "Not a valid integer" error
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi