Where to start?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Comming from a c++ background, I am unfamiliar with programming in VBA.
However I have the need to create a subroutine that takes information from a
subform (in access), compares the data with data held in a table and prints
appropriate information to a report. Could anyone give me some pointers as
to where I should start looking and wether or not this is feasable for a
beginer. (I have ordered a couple of books that should hopefully arrive
soon!)

Thank you
 
Hi,
if you need to compare one value - then you have to write code in report's
module. To get subform value you can use:
Forms!MyForm!MySubformcontrol.form!MyControl

to get a value from a table - you can use Dlookup function

if you need to compare saveral values in a table - then better idea to make
a select query, and use it as a recordsource for report (or subreport)

HTH
 
Thank you Alex,
The db is for simple stock control, So I want the user to select products
and enter required quantities and hit a button that checks those required
quantities against the quantities on hand. The report should then print out
somthing as such:

Product Collect From
------------------------------------------
Boiler Store
Pipes Store

Radiator Supplier


Are you suggesting that the main code should then be placed in report and
the button should simply call the report, or is there a better way?

Cheers
Kenny
 
Back
Top