•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 426,816 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,882 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser: Programming Forums
Views: 1632 | Replies: 1
![]() |
•
•
Join Date: Nov 2006
Location: Feltwell, UK
Posts: 31
Reputation:
Rep Power: 2
Solved Threads: 0
Can anyone help? I have been fumbling around with a SQL statement for days trying to make this work. I am looking for a Statement that will output a table based on an incremented number.
Example Table1:
Value1.......Value2.......Incremented Number
14...............null.............1
12..............15...............2
12...............98..............3
15...............14..............4
17...............15..............5
1.................14..............6
5.................98..............7
Example Table2:
Value1.........Value2
X030............1
X842............5
M123............7
Example Output (For all Incremented Number values between Table2.Value2=1 and Table2Value2=5 add X030, etc.):
Value1.......Value2.......Incremented Number
14...............null.............1.....................X030
12..............15...............2......................X030
12...............98..............3......................X030
15...............14..............4......................X030
17...............15..............5......................X842
1.................14..............6......................X842
5..................98..............7.....................M123
etc. etc.
I have tried a bunch of different SELECT Statements using the max function in conjunction with a less than WHERE statement but, am completely missing the mark.
Is there a way to do this in Access using VB code? Actually any help/examples of reading and updating tables using VB would be extremely helpful!
Thanks for your help!
Mark
Example Table1:
Value1.......Value2.......Incremented Number
14...............null.............1
12..............15...............2
12...............98..............3
15...............14..............4
17...............15..............5
1.................14..............6
5.................98..............7
Example Table2:
Value1.........Value2
X030............1
X842............5
M123............7
Example Output (For all Incremented Number values between Table2.Value2=1 and Table2Value2=5 add X030, etc.):
Value1.......Value2.......Incremented Number
14...............null.............1.....................X030
12..............15...............2......................X030
12...............98..............3......................X030
15...............14..............4......................X030
17...............15..............5......................X842
1.................14..............6......................X842
5..................98..............7.....................M123
etc. etc.
I have tried a bunch of different SELECT Statements using the max function in conjunction with a less than WHERE statement but, am completely missing the mark.
Is there a way to do this in Access using VB code? Actually any help/examples of reading and updating tables using VB would be extremely helpful!
Thanks for your help!
Mark
Hope this helps ..
http://www.devdos.com/vb/lesson4.shtml
http://www.devdos.com/vb/lesson4.shtml
![]() |
•
•
•
•
•
•
•
•
DaniWeb MS Access and FileMaker Pro Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Inserting,deleting,updating and editing records to a MS Access database (C#)
- How do I set multi level/rank access to a page? :>/ (PHP)
- Need urgent help. Problem with SQL and win server. (Windows NT / 2000 / XP / 2003)
- DataAdapter problem with MS-Access (C#)
- Whic language for data address cerecting? (Software Developers' Lounge)
- how to validate text file, loading into listbox (Visual Basic 4 / 5 / 6)
- asp problem ADODB.Recordset error '800a0bb9' (ASP)
- connect with access (Visual Basic 4 / 5 / 6)
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: MS Access to web without SQL
- Next Thread: Access and SQLite


Linear Mode