Loop / Copy from one form/table to another. (1 Viewer)

Ade F

Avid Listener
Local time
Today, 11:11
Joined
Jun 12, 2003
Messages
97
Please could someone enlighten me on the following scenario I have.

I would like to get from a button click the information from Sheet_subID (cat_parameter) copied into the Main sheet Description field. I think this maybe would be done with a loop? Taking one from in tunr from Sheet_subID and then putting it into the description filed until al cat_parameters have been copied.

This information is not beng duplicated as such because the text that lands in the description field will be modified slightly by the user. The information contained within the Sheet_subID are for presets for in the case below Compensator Setting 3. Compensator 1 would have different presets.

Any thoughts people?

Cheers

Ade

 
Last edited:

Fizzio

Chief Torturer
Local time
Today, 11:11
Joined
Feb 21, 2002
Messages
1,885
Hi Ade,

I'm not 100% clear what you are trying to do but can you not do this with a simple parameter append query?
 

Ade F

Avid Listener
Local time
Today, 11:11
Joined
Jun 12, 2003
Messages
97
Loop problem elaborated.

To elaborate a little further this is the system I'm trying to put together

The sheets are for commissioning reports

Having chosen SheetID then Sheet_subID has corresponding parameters displayed in linked sub form. This way I can have a set amount of parameters for the item.

The main form is field in by an engineer but I wish for the cat parameter entries to be copied at the press of a button down into the Main sheet this way an engineer has a basic layout of fixed parameters for in this case Compensator Settings 3 his main sheet description could then be modified by the engineer for slightly different textual descriptions. and nex to these description he could would enter a value for that description. Basically I could create a button with vb to manually input a text line then move to next record and input another I just thought it would be most useful if I could have these stored in a table so If I chose to update or add new parameters then I would not have to change code.

Hope this explains a little better. I must admit its a little strange but I hope this helps.

Thanks for the reply Fizzio

Ade
 

neileg

AWF VIP
Local time
Today, 11:11
Joined
Dec 4, 2002
Messages
5,975
It sounds like a combo box would be best. If you ensure the Limit to List property is set to no, then you can select an entry from the combo and then edit it as required. You would need a table to hold your standard narratives and base the combo on that. Make sure you store the text from the combo.The combo box wizard will try and use an ID field but you need the text.
 

Ade F

Avid Listener
Local time
Today, 11:11
Joined
Jun 12, 2003
Messages
97
Thanks for the reply

It would be nice to go via a button route were upon pressing a button all presets stored in sequencial order on Sheetsub_ID are in turn copied into the main form at the bottom. Is this possible? If so I dont have a clue as to how to do it via vb!.

Basically an engineer would want all the presets to the them modify them slightly and add values. I have stored these presets in a table for easy modification and adding extra parameters/presets.

I just cant seem to get into my head how I would grab a field from Sheetsub ID and them copy it into record1 on the main form down bottom. Then get second record from SheetsubID then copy into record 2 of main sub form etc etc.

Sorry but I'm not a full time developer and getting my head around loops from one form to another is proving a little hard for me at the moment.

Regards

Ade
 

neileg

AWF VIP
Local time
Today, 11:11
Joined
Dec 4, 2002
Messages
5,975
Create a combo box that has all of the fields in your table of presets, but set the column widths for all fields other than the main one to zero so they are there but invisible.

In the AfterUpdate event of your combo, include code that sets the value of your controls on the form to the relevant column in the combo (beware, column numbering starts at zero).

I'm not a trained developer either, and everything I know I learned from these pages!
 

Ade F

Avid Listener
Local time
Today, 11:11
Joined
Jun 12, 2003
Messages
97
The DB

I have attached the lash job DB I have made for this problem. I know the syntax of field is terrible but once I have this problem solved I will develop the DB from scratch.

If you could look at it and even have a go then It would be greatly appreciated

Many thanks neileg as you have helped me some time ago with a solution and it was much appreciated then as well.

Cheers

Ade
 

Attachments

  • comrep.zip
    91.8 KB · Views: 163
Last edited:

Ade F

Avid Listener
Local time
Today, 11:11
Joined
Jun 12, 2003
Messages
97
recordset clone?

From looking around in the forums would it be possible to do this with some kind of recordset clone. To then copy them into the underlying table?.

I' really not familiar with such programming so I wondered if someone could come up with an example from my db?

Any thoughts?

Cheers

Ade:)
 

Users who are viewing this thread

Top Bottom