Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Form question

Status
Not open for further replies.

CBradshaw

IS-IT--Management
Jun 24, 2002
82
GB
Guys,

I have a Form, (call it form2) which derives a few fields from another form (call that form1).

Form2 is access through form1 via a control button. The derived fields work well and all is sweet. Form2 is relevant to a table (table2) however the derived fields in that form are not inputted into table2 and thus never updated.

Just in case the above is not clear, I will put it a different way.

I want to derive 2 fields from form1 to form2. This i have done using the Expression builder. The only process I want to happen is that each time I open up form2, from a different entry on form1, it needs to create a new entry in form2's corresponding table (table2) to enable any changes I make in form2 to be added to said new field in the table2

Any help greatly appreciated. I just have no idea when it comes to access, as I'm sure you can gather by the above ;o)

Cheers

Craig
 
this should go into the Access Forms Thread...

back to the problem...
so what you are saying is you want your form2 to update the data in form1 as well?

if that's the case, then what you need to do is to bound the form to both tables, not just the 2nd table. You do this by putting a SQL statement in the recordsource property of the form...
Something like:
"SELECT tbl1.*, tbl2.* FROM tbl1 INNER JOIN tbl2 ON tbl1.id = tbl2.id;"

then when you change the derived fields, you'll be changing data in tbl1...
 
Crowley

Thanks for the quick response. Apologies for posting in incorrect forum...

As for what you said. Basically no. I want the form2 to add the details I input, and those derived from form1 into it's own table thus saving the data for reference and editing etc.

Form1 from table1.....form2 uses manual input, and some fields derived from form1. The collective details from form2 should then be added into 'table2' as a new record but linked to the form1 record.

It's a support log you see.

Logno1.....the information is input into form1....then a second form (form2) launched from form1 houses any follow up instructions etc... I need this data to then be saved in a table for retrieval

Hope this makes sense

cheers

Wiggz
 
so you want to have data from form1 and data from form2 to be saved onto a table...

well, the best way is to firstly on form1 when the button is pressed, create a record in the table, and fill in the relevant details...

then when opening form2, bound that form to the record just created...

however if all your information is already on form2, then you just need to create a table, and bound form2 to that table...
 
Crowley

The second part of what you said...

"however if all your information is already on form2, then you just need to create a table, and bound form2 to that table..."

..seems to be what I'm after. I'm sorry but I don't know how to Bind table to a form etc...

Please attempt to circumvent my newbieness

Regards

Craig
 
k, well, either you can do it the easy but ugly way which is to use a form wizzard and it'll ask you where to get your data from, so just select the correct table...

or you could do it the hard but nice way, which is to put the name of your table in the recordsource property of your form.
and then for each control that needs to be tied to the table, you need to "bound" that control to the relevant field in the table. Quite easy to do, just put the name of the field into the control's recordsource property...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top