Home > Software engineering >  VB6 novice learning for help, about the two table at the same time search multiple fields
VB6 novice learning for help, about the two table at the same time search multiple fields

Time:11-02



A library B parts process library C library
Parts of A process 1 16 12 7
Parts of A process for 2 2 2 22
A process 1, 3, 4, 8 parts
Parts of A process 4 17 July 11
Parts of A process May 8, 63 36
Part B process 1 5 8 8
Parts process 2 4 and 8 B
Part B process 3 8 67 22
Part B process 4 11 3 3
Part B process 5 36 90 90
Part C process 1 63 5 7
Part 2 C process 8 April 22
Part C process 3 22 August 8
Part 4 C process 67 22 8
Part C process May 8, 63, 67
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

table 2

Parts process A B C library library time
Parts of A process 1 February 20, 12 July 16
Parts of A process 15 February 21, 12 July 1
[b] parts A process 1 11 15 February 25 July
Part A process 1 October 16 February 26 July
Parts of A process for 2 2 2 22 February 20,
Parts of A process 2 6 0 26 February 24,
Part A process 2 0 27 February 25th July
Parts of A process 2 8 0 28 February 26
Parts of A process 3 7 0 14 February 24,
Part A process 3 8 0
15 February 25,Parts of A process 3 9 0 16 February 26
Parts of A process 4 17 July 11 February 23
Parts A process 4 18 8 8 February 24,
Parts of A process 4 24 August 17 March 2
Part 4 A process 25 September 15 March 3
Parts of A process May 8, 63 on February 28, 36
Part B process 1 4 5 6 March 2
Part B process 1 4 8 8 March 3
Part B technology of 1, 4, 5 4 March 4
Part B process 1 2 3 4 5 March
Part B process of 2, 4, 5, 8 February 23
Part B process on February 25, 2, 3, 5 17
Part 2 B process on February 26, 5 0 5
Part B process 3 1 4 7 February 23
Part B process 3 2 5 15 February 24,
Part B process 3 3 4 5 on February 26,
Part B process 3 8 June 5 February 27
Parts process 5 B 36 90 90 February 24,
Part 1 C process on February 25, 63 5 7
Part 2 1 and 4 C process 9 February 24,
Part 2, 3, 8 C process 3 February 25
Part C process on February 26, 2, 3, 8 7
Part 2 4 6 C process 2 February 27
Part C process on February 28, 2, 3, 4, 5,
Part 2 C process on March 1, 6 4 7
Part 3 22 August 1 C process on February 27,
Parts 3 C process 21 July 8 February 28,
Part 4 C process on February 27, 67 22 8
Part C process May 8, 63, 67 on February 27,
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --


now I encountered the problem is that I want to in table 1 after the search field, such as:
Parts of A process 4 17 July 11
Part B process 3 8 67 22
Part B process 5 36 90 90
Part C process 3 22 August 8
Part 4 C process 67 22 8

in table 2 to search the above I selected records, such as I choose this two records:
Part B process 5 36 90 90
Part C process 3 22 August 8

hope to come out as a result of the (according to the parts and technology retrieval) :
Part B process 3 1 4 7 February 23
Part B process 3 2 5 15 February 24,
Part B process 3 3 4 5 on February 26,
Part B process 3 8 June 5 February 27
Part 4 C process on February 27, 67 22 8

I use the database is ACCESS2000, table controls DBGrid
If cannot choose records retrieval table 2, also want according to table 1 retrieved all of the data (or only in parts and technology retrieval) to retrieve the table 2

Thank you first!

CodePudding user response:

Select a.x a.y, a.z b.x, b.r, b.i from a, b, where a.x=b.x
  • Related