Results 1 to 10 of 10

Thread: Range Fields

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    65

    Range Fields

    Hello ,

    Can we create a table field like ranging from 1-500 will be known as the cheque book numbers of acc id = 1 .

    In short words I mean like can i create range fields and update them when the cheque numbers of a particular account has been finished.

    Any ideas,codes and sql synataxes or any logical explaination for this thing is requsted and appriciated.

    Regards,
    Muhammad Haris

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Range Fields

    You might want to give a little more info so we can help. What type of Grid control is this or is this Excel? If so what version? Doing this in Excel only or automating it from VB6?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    65

    Re: Range Fields

    It isint a datagrid or an excel file , I have a field in the database known as cheque serials and i want to do make that field a range field, a range field as in like for an accno which is 1 (accno=1) the cheque serials issued were 1-500.

    I wanted this application to work like if we withdraw a cheque ranging from 1-500 the account balance is deducted from the accno = 1 else it checks if 501-1000 is accno =2 then it deducts from the accbalance of accno =2

    I hope you know how the bank withdraw,account balance and cheque book serials works in the bank.

    Any big description/solutions/codes/methods regarding this would be appriciated.

    Regards,
    Muhammad Haris

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Range Fields

    So it sounds like you are using a Database then. Which one? You can create an auto incrementing field but the syntax/type differ depending on the db your using.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    65

    Re: Range Fields

    I'm using MS Access 2003 , I understand the auto incrementing logic but How can i assign like 1-500 for one user but other user have 501-100 and then the third user is automatically got 1001-1500 and the 4th user got 1501-2000 but for example when 1-500 of the first user is finished it is assigned with 2001-2500.

    Any logics/solutions/comments?

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Range Fields

    Its a design issue here then. You can not skip IDs but you can just use a numeric field and create the ID numbering yourself. Are you doing this all in Access with an Access form?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    65

    Re: Range Fields

    No , I'm not making forms in ms access but I Have connected database with visual basic.Can you please make me a example of database and a example form in visual basic?

    Please

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Range Fields

    Sure, checkout our ADO database turorial located here - http://www.vbforums.com/showthread.php?t=337051
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9
    Addicted Member LeonX's Avatar
    Join Date
    Dec 2004
    Location
    Jakarta, Indonesia
    Posts
    172

    Re: Range Fields

    just keep the last serial issued, so when there is someone issued the check it will retrieve the last serial plus 499.
    Regards,
    Ferry

  10. #10
    Addicted Member LeonX's Avatar
    Join Date
    Dec 2004
    Location
    Jakarta, Indonesia
    Posts
    172

    Re: Range Fields

    use this field:
    - unique id
    - user id
    - start serial
    - last serial
    - a flag: when the user had used the last serial set this flag
    Regards,
    Ferry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width