I need to create access table with VB Programming

seanbee

Registered User.
Local time
Today, 02:21
Joined
Sep 13, 2014
Messages
18
Hello,

I got this project dropped in my lap. I need to create a second table off of original table. pull of certain fields and then within to particular fields. there is a range of numbers that represent credit and debit numbers. create a range which . i need to create additional fields for the table. That I have to created?
Please point me in right direction to do this particular task. Any help is appreciated very much. Thank you in advance.

Best Regards,
Sean
 
Why does it have to be a new table? Access treats queries almost exactly the same as tables.
 
  • Like
Reactions: Rx_
So please point me in the right direction. where I can query the table with specific fields and then create a range look up in two particular fields I choose?

thanks in advance.
Sean
 
So please point me in the right direction. where I can query the table with specific fields and then create a range look up in two particular fields I choose?

Create - > Query Design

Honestly, read your description; you're missing the trees. I know you have this master idea about how this process is to work, but drop that for a second. You've essentially described what Access does--allow you to select datasources, pull in specific fields and then apply criteria to generate the data you want.
 
OK Guys Sorry: Let me be more Clear. I need to write a VB Query on a table caleed BINWIP. Within this table. I need to query a fileld called BINDTLCARDIN and create a way to look at a range of numbers in another field called BinLOW and BINHigh. I need to to be able to do that VBprogramming.

Thanks in advance.
 
The conflict we are having is that this is relatively simple thing to accomplish, but you are asking how to do it. You're adamant that this needs to be in VBA, yet you don't know how to do it; so we are questioning your motives and wonder if this truly needs to be in VBA.

With that said, it is a simple query:

Code:
SELECT BINDTLCARDIN, MIN(BinLow) AS LowestBinLow, MAX(BINHigh) AS HighestBinHigh
FROM BINWIP
GROUP BY BINDTLCARDIN

Put that in a query--I know I know, VBA--but humor me. Run that query and tell me if it provides you what you want. If so, explain why this needs to be in VBA and we can go from there. If not, tell me how it doesn't produce what you want.

Even if you use VBA to query data, the best way to debug a query is using an actual query to build and test the correct SQL for it.
 
>>>Even if you use VBA to query data, the best way to debug a query is using an actual query to build and test the correct SQL for it.<<<

Yes...plog is correct... The query Builder is the best tool in MS Access for VBA programmer's.
 
OK...So so if I use the query wizard and create the query that way..will it give me the ranges to obtain.. can you please explain ..how to use query builder to build this query to add more then one field or is there a tutorials for this. Ill do it with the query builder. Just need a little guidance.

Thanks in advance.
 
To use the code I gave you in my previous post, you don't actually use the wizard. Go to Create->Query Design. It will open a query and give you the option to add tables. Close that box and then in the upper left hand of Access click the 'SQL' button and paste in my code, then click that button where the 'SQL' button was and it will generate results.

If you want to get into the nuts and bolts of the query we can--for that I'll need information from you because I don't fully understand what results you want. If the query I gave you doesn't produce what you want, tell me how its not working and what you expect. If you can use actual sample data to illustrate that it would be helpful.
 
ok..thanks. looking at it now. I would like to take the BINWIP table. Use the fields I gave you and generate another table athe will use the ranges in BINLOw and BINHIGH to produce a range of selected numbers that vary..ie: 4000 -4999 = Visa, 5100 - 5599- MsterCard. 3400-3499 = American Express.
 
Can you demonstrate with sample data? Show me sample data of what's in BINWIP and then, baseed on that data, show me what you expect as the resulting data. Be sure to include field names.
 
sure..how would you like me to show that. screen shot or simple 10 or 15 record dbf . only got screen shot of what I want the result to look like

Thanks for all your help.
 
screenshot is good. Just make sure I have 2 sets--starting and then what the results should be based on that starting data.
 
Here is screen shots: Says I need 10 post or greater..so I and right on the bubble.
 
Before:

Bin-DBF_zps9b8c1f5b.png
 

Users who are viewing this thread

Back
Top Bottom