Pass PK to popup form as FK - Modal (1 Viewer)

Zydeceltico

Registered User.
Local time
Yesterday, 21:53
Joined
Dec 5, 2017
Messages
843
I know nothing of your business, nor welding. So you are going to have to explain to me what real world process those tables are capturing. The simpler the terms the better. I know no welding jargon and you shouldn't use database jargon in explaining the real world process.

Point straight up with the index finger of your left hand. At the same time point down with the index finger of your right hand. Touch the tip of your left with your right - straight up and down. Lift and lower the right hand repeatedly - slowly and touch fingertips every few 10 seconds or so. Your fingers together comprise one welding gun. The time spent with fingertips touching is a weld cycle.

To explain the AC welder which is slightly more complex than the DC welders, touch your fingertips as above. While they are touching, press the tips together for 100 millseconds, relieve the pressure but don't separate the tips, apply pressure again, relieve, apply pressure and hold for 2 seconds.

That is a full weld cycle on an AC welder.

ALL welders - AC and DC have at least four guns (pairs of fingertips). All four guns are not required for all products - on either welder. Depending on the requirements of the product being made, only one gun may be used or two or three or all four - and in a very rare case on a single welder that we own - five.

When you are intentionally pressing the tips together we measure 1) the amount of pressure and 2) the length of time you are holding that pressure. This process can repeated multiple times.

Also, for every time you press your fingertips together an electrical current can be passed from the upper fingertip to the other. The amount of that current can be programmed differently for every time you press the tips together.

The pressing together can happen 1 time or more than once - usually twice but sometimes three.

So you have a "weld time" which is the length of time tips are touching; "weld pressure" (the amount of force between tips) and weld amperage (the amount of current passing through tips) - and again - on an AC welder this can all happen multiple times WITHIN ONE WELD CYCLE (see my 1st paragraph above).

The various programmable settings on the welder control this process. This amount of programmability only happens on an AC welder and the controls are named very differently than on a DC welder.

If the AC welder is the Maserati of welders, the DC welders are the Ford F-150s (or Dodge Ram or whatever). They are not "mindless" but they are not nearly as complex as the AC welders. Their controls are similar as you can see from looking at the two tables but only similar - they are not the same.

For one thing, on a DC welder, the fingertips only touch once and that is it. The "pumping" action of the fingertips only happens on the AC welders.

With that said, I would try to combine tblDCWelderMeasure and tblACWelderMeasures. They already share a lot of the same fields, and with a little finessing they could share more.

So - because I have to eventually create forms that collect this data in this most efficient - on the shop floor manner - I am struggling to see how I can normalize these two tables anymore. I am also not completely sure that I have them realting to the correct table in the mockup I sent earlier.

THe more I think about it though - I just realized that every weld nugget record from tblWeldNuggets is defined and recorded as the product of a specific weld gun on a specific welder.

Weld nuggets: To do a weld test we take a piece of material (2"x4") that is from the same original stock as the real parts we are welding together. We clamp these two pieces together. This is called a weld coupon. Each of the two pieces in the weld coupon is marked with 1) the job number; 2) the Coil number that it came from (original material); and 3) the weld gun number - SO - AHA - each weld nugget (A and B) is related to a specific weld gun on a specific welder (AC or DC).

The only bugger I just realized is that with AC welder - the entire process I described above - the programming - happens for EACH OF THE FOUR GUNS on an AC welder whereas, on the DC welders, the settings are global to the welder itself and one set of settings effects all four guns.
 

Zydeceltico

Registered User.
Local time
Yesterday, 21:53
Joined
Dec 5, 2017
Messages
843
The only bugger I just realized is that with AC welder - the entire process I described above - the programming - happens for EACH OF THE FOUR GUNS on an AC welder whereas, on the DC welders, the settings are global to the welder itself and one set of settings effects all four guns.

In other words - with the AC welder there will be one weld test with as many as 4 sets of settings data - one for each gun being used. BUT the DC welder will always only have 1 set of settings data that controls all four guns.

BUT AGAIN - we collect WeldNugget data for every gun being used.

I forgot to explain the rest of the weld test. SO we have our two pieces clamped together. Then we hold them between the upper and lower tips of the weld gun and close the tips to perform the weld. After the piece is welded, the tips open, we make sure we have marked the coupon with the gun number. The weld will be a visible round area int he middle of the two sandwich pieces that make up the coupon. This round area is usually about 3/8" in diameter and about 1-1/2" from end of the coupon.

We pry the two pieces of the coupon apart and tear them from the weld. In a passing test, the round weld area will tear away from one or the other of the original pieces of material. We measure the diameter of the exposed wld area. It is also important to note that the original material was ripped/torn when prying the two pieces apart. You want it to rip. That means the weld was stronger than the parent pieces of material.

The remaining round area of the weld is called the weld nugget. And it is very important.

So each welder has four weld guns. A weld test is performed on each of the four guns (depending on how may are required by the product being manufactured). The coupons from each of those weld tests proscribed to a specific gun produces as weld nugget that can is directly to the spcifc weld gun on the specific welder - which could be either AC or DC and depending on which one it be will have one of two different types of weld setting information to record.
 

essaytee

Need a good one-liner.
Local time
Today, 11:53
Joined
Oct 20, 2008
Messages
512
So after I have entered data on one of the Child forms, I want to click a button to "save" and EXIT from the Child form and requery the Parent form.

How do I do that part?

In response to Post #10 in how to handle the return to your parent form after adding/editing a child form, the following is also a viable approach. This approach is useful when data-entry child forms are unbound but I can't see why it couldn't be used for bound forms.

From your parent form, open the child form (data entry form) as AcDialog (all code in calling form halts).

The child-form takes over. You would have set some sort of flag to indicate either an Edit or New Record.

The child-form will have at least a Save and Cancel button.

Within the Cancel button, code to close the form (causing return to the parent form).

Within the Save button, hide the current form (this also causes return to the parent form).

Whether clicking Save or Cancel, you are returned to the calling form. The difference is that in the very next line in your calling form, check if your child form is open, if it is, you can access that form and deal with any values thereon and do whatever processing is required on your parent form. After accessing the values on the child form, close it.

If the child form is closed, then process your parent form as required, you know the child form was cancelled, not saved etc.

Using this method the passing of the Parent PK, which is the FK of the child record, that value is simply referred to from the child form, no special treatment. Yes, it can still be passed via the OpenArgs method, just saying though.

The above is just the raw guts of the method.

The take-out message of this is that
Code:
Me.Visible = False
returns code execution back to the calling form.
 

Zydeceltico

Registered User.
Local time
Yesterday, 21:53
Joined
Dec 5, 2017
Messages
843
The remaining round area of the weld is called the weld nugget. And it is very important.

A different way of saying it: It is really important to relate tblWeldNugget to THE COMBINATION of tblWelders and tblWeldGuns.

And then it is almost equally important to relate the correct tbl**WelderMeasures to all of the above.
 

Zydeceltico

Registered User.
Local time
Yesterday, 21:53
Joined
Dec 5, 2017
Messages
843
I know nothing of your business, nor welding. So you are going to have to explain to me what real world process those tables are capturing. The simpler the terms the better. I know no welding jargon and you shouldn't use database jargon in explaining the real world process.

With that said, I would try to combine tblDCWelderMeasure and tblACWelderMeasures. They already share a lot of the same fields, and with a little finessing they could share more.

plog - first of all please see my multiple responses for an explanation of our process - also attached to this post is a picture of a the results of a completed weld test that will hopefully assist in clarification.

I should also probably note that in tblWeldGuns - th PK - WeldGun_PK - could easily be replaced by a composite key of Welder_FK AND WeldGunNumber. I don't know how to utilize this but it is true nonetheless.
 

Attachments

  • 20190228-A.jpg
    20190228-A.jpg
    56.5 KB · Views: 95
Last edited:

Zydeceltico

Registered User.
Local time
Yesterday, 21:53
Joined
Dec 5, 2017
Messages
843
I know nothing of your business, nor welding. So you are going to have to explain to me what real world process those tables are capturing. The simpler the terms the better. I know no welding jargon and you shouldn't use database jargon in explaining the real world process.

With that said, I would try to combine tblDCWelderMeasure and tblACWelderMeasures. They already share a lot of the same fields, and with a little finessing they could share more.

plog - after hours of trying to work normalization out to perfection I am 1) brain-fried and cussing and 2) not at all convinced that this is a pragmatic way to go. :) Just sayin......................

At a point in the not so distant future - this HAS to become a useable and form driven interface - - and I do not know enough VBA to make it work. Brother - or Sister - I'm dyin' over here. :)

.....and more than a little ADHD so I have this hyper-focus thing going on.................and........aaaaggghhhhhh............ LOL

By my measure the two weld measure tables cannot be combined in any meaningful way - - -and yes - - - I admit that I am likely missing something - - but I usually don't "miss something." So............
 
Last edited:

Zydeceltico

Registered User.
Local time
Yesterday, 21:53
Joined
Dec 5, 2017
Messages
843
By my measure the two weld measure tables cannot be combined in any meaningful way - - -and yes - - - I admit that I am likely missing something - - but I usually don't "miss something." So............

my brain hurts. perfect is hard. :)
 

plog

Banishment Pending
Local time
Yesterday, 20:53
Joined
May 11, 2011
Messages
11,646
I was kinda hoping for a paragraph or two--"we weld parts together and need to test our welder and its component units....".

I believe you can combine your WelderMeasures tables:

tblWelderMeasures
Measures_PK
WeldGun_FK
PressureReading
SqueezeTimeA
SqueezeTimeB
WeldTime
HoldTime
AirPressureSetting
PercentHeat
UpsopeCycleA
UpsopeCycleB
UpsopeCycleC
SqueezeNewts
WeldSequenceNumber
WeldPressure
WeldAmperage
HoldPressure

This will hold all the data in both tables, just leave the corresponding fields blank when doing an AC/DC measure.
 

Zydeceltico

Registered User.
Local time
Yesterday, 21:53
Joined
Dec 5, 2017
Messages
843
I have never understood the "Save Record" concept since it really does not exist. You can undo a record, but I do not get the need to "save a record" since it is going to happen.

The best I can tell is that the option to "Save Record" acts as an obvious placeholder to add functionality too. Past that - I see what you're saying.
 

Users who are viewing this thread

Top Bottom