Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 10-06-2016, 10:01 AM   #1
azeeshan
Newly Registered User
 
Join Date: May 2016
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
azeeshan is on a distinguished road
append query to add cheque book series

Hi Friends,

I want to append cheque book series by providing first and last value of cheque series or any other way to append number series upto specfic number. For example

append data in chqnumbers field between 3456610 up to 3456610+75, thus by executing the query, chq numbers are filled like
3456610
3456611
3456612
........
........
.......
3456685

appreciate your soonest response.

regards

azeeshan is offline   Reply With Quote
Old 10-06-2016, 10:20 AM   #2
Uncle Gizmo
Nifty Access Guy
 
Uncle Gizmo's Avatar
 
Join Date: Jul 2003
Location: Newbury Berks UK
Posts: 9,541
Thanks: 368
Thanked 784 Times in 749 Posts
Uncle Gizmo is a jewel in the rough Uncle Gizmo is a jewel in the rough Uncle Gizmo is a jewel in the rough
Send a message via Skype™ to Uncle Gizmo
Re: append query to add cheque book series

Quickest and easiest way for you to do it yourself would be to create the list in Excel and then import that into Access...
__________________
Code:
                 |||||
               @(~Ô^Ô~)@
-------------oOo---U---oOo-------------
|                                     |
|      Uncle Gizmo              |
|                                     |
|                                     |
| Get $20 worth of "Nifty Code"       |
|      
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
| | Ooo | |_________________ooO____( )________| ( ) ) / \ ( (_/ \_)
Uncle Gizmo is offline   Reply With Quote
Old 10-06-2016, 10:37 AM   #3
plog
AWF VIP
 
Join Date: May 2011
Posts: 8,986
Thanks: 10
Thanked 2,159 Times in 2,114 Posts
plog is a jewel in the rough plog is a jewel in the rough plog is a jewel in the rough
Re: append query to add cheque book series

Can you explain what you would like the exact process to be? Is a user going to open a form? Will there be inputs for first/last check numbers? How often will this be run?

plog is offline   Reply With Quote
Old 10-09-2016, 06:20 AM   #4
azeeshan
Newly Registered User
 
Join Date: May 2016
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
azeeshan is on a distinguished road
Re: append query to add cheque book series

Thanks for taking interest.

Let say i have a form with a subform, on the main form i have 2 fields "first" and "last" both number fields. and on subform i have one field "chq_no" which is numeric as well.
and a button on main form representing the append query behind.

if i insert number 1 in first field and number 15 in last field then upon pressing the button, subform chq_no field is inserted with a series of numbers between 1 and 15 like below

chq_no
1
2
3
.
.
.
15

i just need to know how to use append query by adding +1 and make series.
regards
azeeshan is offline   Reply With Quote
Old 10-09-2016, 06:50 AM   #5
plog
AWF VIP
 
Join Date: May 2011
Posts: 8,986
Thanks: 10
Thanked 2,159 Times in 2,114 Posts
plog is a jewel in the rough plog is a jewel in the rough plog is a jewel in the rough
Re: append query to add cheque book series

In that instance you would put code on the button to run VBA. That code would do the following:

Put the starting value into a variable (int_CheckNumber)
Put the ending value into a variable (int_LastNumber)
Run a loop (either for or while) from starting value to ending value.
Execute an APPEND query using Docmd.RunSQL that inserts a record with int_CheckNumber
Update int_CheckNumber to int_CheckNumber +1
plog is offline   Reply With Quote
Old 10-09-2016, 06:58 AM   #6
azeeshan
Newly Registered User
 
Join Date: May 2016
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
azeeshan is on a distinguished road
Re: append query to add cheque book series

I don't know how to write vba code, it would be helpful, if you could explain me a step by step instructions...
appreciate your cooperation.
azeeshan is offline   Reply With Quote
Old 10-09-2016, 09:19 AM   #7
plog
AWF VIP
 
Join Date: May 2011
Posts: 8,986
Thanks: 10
Thanked 2,159 Times in 2,114 Posts
plog is a jewel in the rough plog is a jewel in the rough plog is a jewel in the rough
Re: append query to add cheque book series

If you need this done then I suggest you start learning how to code VBA. This would be a good beginner level project.


plog is offline   Reply With Quote
Reply

Tags
append , cheque , sequence , series

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
cheque printing report layout oleronesoftwares Reports 1 09-23-2014 06:22 AM
Cheque Printing Utility McObraz General 0 08-07-2013 10:24 AM
Time Series for Portfolio Book Values JapanFreak Queries 4 05-12-2011 12:02 PM
Two line cheque printing johnroy16 Reports 3 03-21-2010 05:38 AM




All times are GMT -8. The time now is 04:17 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World