View Full Version : HELP ME ASAP!!!!


dumb_student
06-06-2001, 02:47 PM
hi imma dumb student and we got this test.. and theres this lil bit im stuck on..

what needs to be done is.. we are acamping ground with vacancies sorting stuff out..

i have 2 feilds i am stuck on; catagory=caravan day, weekly cabin day, weekly etc

and tarrif price...

now what is wanted for us to do a simple price without it being relevent to the catagory above..

But i want to go the extra mile and do this..........
i want it to be so you will choose a catagory in the catagory feild and the price will automatically come up in the tarriff field.

eg. catagory=caravan day
tarrif=$40

yeah automaticaly

can someone help me?

Pat Hartman
06-06-2001, 05:18 PM
Create a table with two columns - Category and Price. Then use this table as the rowsource for a combobox on the form. In the AfterUpdate event of the combobox put the code to store the price in the current record -

Me.YourPriceField = YourCombobox.Column(1)

The combobox columns are a zero based array so the second column which I'm assuming will be price is actually referred to as Column(1).

See the Northwinds.mdb for a working example of this technique. They use it to get prices for the items being ordered. This db is full of useful techniques and is well documented. You can even find web based tutorials available on the Microsoft side. The other very useful db you should be aware of is solutions.mdb. This no longer ships with the standard edition of A2K but you can download an A97 version and convert it. Also available on the download site are databases to specifically teach you about forms, reports, queries, and graphs. Whow your teacher by incorporating some things you see there. You'll probably even show him some new tricks.
http://support.microsoft.com/support/access/content/97downloads.asp?FR=0