data from form input to report

s0rtd

Registered User.
Local time
Tomorrow, 04:26
Joined
Apr 16, 2003
Messages
96
hey guys,

i am trying to create a report which contains data from a form, and some data which needs to be entered upon runtime (report).

I have an input for which has fields like job number and details of job etc... the form is built upon a query.
the data is saved when you click a button on the form or if you exit.

the report i am trying to create needs to grab this data before it is saved (the report will be printed out for the customer to sign)
can i get the data into the report?

also

there are some fields that are not in the form, so i need to enter values for these upon running the report, and put them into the appropriate text boxes.

any help will be much appreciated.
cheers
Jurgen
 
I would put all the necessary text boxes on the form and then in the report I will use code like this as the Control Source for each control on the report:

=[Forms]![NameOfYourForm]![NameOfControl]

hth,
Jack
 
thanks Jack! :)
works flawlessly!

i have another question, one of the fields on the form is customer name, now in my report i am required to have an address field telephone and so forth, all of these are linked to the customer, but are not included on the form.

is there any way i can get these fields onto the report?
without adding more fields to the query and adding them to the form?

cheers
 
I am glad the solution worked for you.

You can use =DLookup() as the Control Source of the fields in question, but DLookup() is notoriously slow. I would suggest adding the additional fields to the query and the form....

Jack
 
I have just tried adding the fields to the query and then added them to the form, when i run the form i get :
Code:
#Name?

appear in the field

now the fields i have added to the querry are from another table other than what the customer name field is based on
ie: customer name - table service jobs
address - table marketing database

the marketing database table is linked to the service jobs table as: #2- include all records from table service jobs and only those from table marketing database where the joined fields are equal.
the fields linked are customer -service job table to ID - marketing database table.


so, im not quite sure what i am doing wrong or how to fix it.

spose i should use dlookup?
=DLookup() as the Control Source of the fields in question

what do i specify between the barckets? the table name and all, which is what i think.

cheers for your help

only a newbie for so long!! :) thats the way i see it!
 
Last edited:
Not sure how your join should be between the two tables. If # 2 sounds correct then it should be OK, but start off using # 1. As for the form you will need to drag the fields you added to the query from Field List in the form to the form itself or make sure that the Control Souce for the controls is set properly. If the new fields you added do not show up in the Field List then remove the query from the forms Record Source, save the form, reopen the form and select the query again for the Record Source.

I hope this helps and my last question is, "What happened to the America's Cup?"

Jack
 
cheers, i just edited my post with the links between the tables

yeah i added the fields by dragging them from the query.

i think it may have something to do with that link.?

if i change the link type, will it screw anything up? just so i can test it? ie: data in my database?

and about the americas cup, we will get it back ahahaha :P

cheers dude
 
You can fiddle all you like with the links. You can't hurt a thing... You ARE working with a copy of your database aren't you? Experiment as that is how you learn... Also, opening the query directly will show you what records are displayed and what records you will see in your form...

The name of the cup is the America's Cup, but we seem unable to recapture it. Well, we had it for 100 years so I guess it is time to share it....

Jack
 
the dbase is split into two parts a frontend and a backend (with all the data)

i have my own copy of the frontend, but others use the backend with their front end.

:yup, sharing is what makes the world go around! (well it should be :)
 
Then just be sure you have a backup of your frontend and let it rip. You can, if you like, import the tables into your frontend and then you will have complete control over 'your' database.

You are right about sharing... I share my money with NZ and they share their Sauvignon Blanc with me... A good deal for both of us...

Jack
 
hehe :)

hey is there any reason why some fileds from the marketing table that i add to the form work fine, but others just produce #Name? -by the way does that mean cant fetch data?

cheers
 
I do not know why you are getting #Name, but this information is from Access Help...

#Error? or #Name? may appear in a control for a number of reasons. To correct the problem, do the following:

Make sure that the field specified in the control's ControlSource property hasn't been removed from the underlying table or other record source.


Check the spelling of the field name in the control's ControlSource property.


If you specified an expression in the control's ControlSource property, make sure that there is an equal sign preceding the expression.


Make sure that there are brackets around references in expressions to control or field names that include spaces. For example, to subtract a Shipped Date field from a Required Date field, enter the following expression: =[Required Date]-[Shipped Date].

Jack
 
its all go now :) everything is working perfectly!!

for some reason before things would work i had to close the form and then open it up again? strange because i saved it while i was working on it!

cheers for your help once again :)
 

Users who are viewing this thread

Back
Top Bottom