Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MS Access

Status
Not open for further replies.

andrew2022

New Member
i have a database made in access. there are approx 1000 records (more being added all the time). each record has its own individual code (starting at 10001). also i have a form what shows all the data. now the hard part: what i want is in the form, when i type the ref number (e.g 10045) i want it ti go 2 record number 10045, not change the number of the current record to 10045. any1 know how this can be done?

next thing i want is another database, but only certain fields. what i want it to do is when i type the ref number, i want it to find that record and enter the data from that record into the database, then when i go to the net line for the same to happen (for this database, i want to type certain records in and display the info for only the records i type, so i can easily print it)

thanx for any help with this. if this isint clear enough i will explain in more detail
 
What you need is an SQL querry. SQL is a simple text based language for searching databases. You should be able to make a simple visual basic module that takes the value from a field builds a SQL statement and runs the querry. It been a while since I did any database programming but that should work. Do a google search for Visual basic for applications or VBA. There should be plenty of examples for using Visual basic to interact with Access.

Brent
 
u should be able to this all in Access. I know you should be able to create a report or a query that will bring back certain fields. i'm not sure how you would then input them into the new table. I will ask a very knowledgeable friend.

I just feel that if you can do it within access, why not?

Actually - do you really need this second database? If you use the report feature in Access, you only have to print certain records, and certain fields - you don't have to print the whole table if you don't want to. Also, when you say 'another database' does it have to be a whole new database, or could it just be a new table, but within the same database?

what i am trying to say is: is the only reason you are doing this so that you can print certain parts of the table, but not all? If so, all you need is the reports thingy - you don't need a second database at all.

Tim
 
al explain in more detail. i have 1 table in a database with the following fields

reference number
description
code
supplier
price
price inc vat
price 2
quantity
location
notes

in this table i need the price inc vat to take the price from the price field and add 17.5% to it

i also need another table (must be a table so i can print certain records). i need it to have:
reference number
quantity
price
description

what i need is when i type the ref number for it to display the record and when i type the quantity (not linked to the main table) for it to times that number by the price

for the form, what i need is a similar thing so when i type the ref number it brings up that record (atm when i type the ref number it just changes the number for that field)

thanx to any1 who can help
 
andrew2022 said:
i also need another table (must be a table so i can print certain records). i need it to have:

no, you don't.

in access, click on reports, then create report using wizard. you can then print directly from the first table, because you don't have to print everything that is in it!

I will check up on the multiplying thing, but trust me, if you try to use more than one table, it will get more complicated than it needs to be.

Tim
 
in this table i need the price inc vat to take the price from the price field and add 17.5% to it
=[price]*1.175

just put that in the field in design view of the report


i also need another table (must be a table so i can print certain records). i need it to have:
reference number
quantity
price
description
simply a case of having those fields displayed in the report

what i need is when i type the ref number for it to display the record and when i type the quantity (not linked to the main table) for it to times that number by the price
this is a bit more complex, and creates a few more probs.The only way i can think to do it off hand is to have a field that called 'quantity' and use the function =[price inc vat]*[quantity] - to do it without this the extra field gets complicated. Having the extra table would prob be even more complicated.

Do you inderstand what i'm on about?

Tim
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top