Yes, that's definitely the right attitude.grayghost4 wrote: ↑Saturday 25th January 2020 2:42am ...If I just take your code and use it ... I have not learned anything ... I have to use your suggestion and implement them myself...
Hello world on a report
Re: Hello world on a report
- grayghost4
- Posts: 187
- Joined: Wednesday 5th December 2018 5:00am
- Location: Marengo, Illinois usa
Re: Hello world on a report
I have not been able to do what I wanted with the report module.
But with your help I have been able to finish my check program and in the process learn a lot
I have posted the program again for comments and maybe someone else will learn some of the things I learned.
Thanks again to those that help !
But with your help I have been able to finish my check program and in the process learn a lot
I have posted the program again for comments and maybe someone else will learn some of the things I learned.
Thanks again to those that help !
- Attachments
-
- printchecksBk.tar.gz
- (218.29 KiB) Downloaded 325 times
- cogier
- Site Admin
- Posts: 1127
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Hello world on a report
Several things you could consider.
In the program the comma is a problem as you are using it as a Split Separator, consider saving with NewLines or my favourite character for this sort of thing "`". It's on the left of the "1" key on your keyboard, I have no idea what it is designed for. So now no need to worry about commas.
becomes
Then use Split(Text,"`") to get your data.
If you have a load of TextBoxes, as in this case, you can give then the same Group name e.g. AllTextBoxes. This means that an event on any of the TextBoxes will be directed to one routine e.g. AllTextBoxes_Change(). You can use the Last keyword which holds all the data of the TextBox last used. Have a look at the 8 routines I have reduced to 1 in the attached.
You could use a ValueBox that only takes numbers and make the other change above and you could remove that routine as well.
In the program the comma is a problem as you are using it as a Split Separator, consider saving with NewLines or my favourite character for this sort of thing "`". It's on the left of the "1" key on your keyboard, I have no idea what it is designed for. So now no need to worry about commas.
Code: Select all
Samplebankofamerica,Mrs. Jone Smith ,1234 Main Street (555)123-7654,Home Town State Zipcode,0789000231,084332167,bankofamerica.jpg,23459
Code: Select all
Samplebankofamerica`Mrs. Jone Smith `1234 Main Street (555)123-7654`Home Town State Zipcode`0789000231`084332167`bankofamerica.jpg`23459
If you have a load of TextBoxes, as in this case, you can give then the same Group name e.g. AllTextBoxes. This means that an event on any of the TextBoxes will be directed to one routine e.g. AllTextBoxes_Change(). You can use the Last keyword which holds all the data of the TextBox last used. Have a look at the 8 routines I have reduced to 1 in the attached.
You could use a ValueBox that only takes numbers and make the other change above and you could remove that routine as well.
- grayghost4
- Posts: 187
- Joined: Wednesday 5th December 2018 5:00am
- Location: Marengo, Illinois usa
Re: Hello world on a report
thank you cogier for the feedback I was trying to find a separator that work and the accent mark look good.
Also thanks for the hint to the use of the Group uses , but I have assinged just the number fields to "NumberBoxes" and I like the code below , I think it is easer to read and self explanatory.
Also thanks for the hint to the use of the Group uses , but I have assinged just the number fields to "NumberBoxes" and I like the code below , I think it is easer to read and self explanatory.
Public Sub NumberBoxes_keypress()
If IsDigit(Key.text) Then
Else If key.Code = key.BackSpace Then 'continue allow key
Else If key.Code = key.Delete Then
Else If Key.Code = Key.Left Then
Else If Key.Code = Key.Right Then
Else If Key.code = Key.Tab Then
Else
Stop Event ' ignore all other keys
Endif
End
I will try switching them to value boxes.