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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Onload Copy Field From One Form To Another 1

Status
Not open for further replies.

435

Technical User
Jul 22, 2003
24
US
Ok I have 2 tables EMPLOYEE & CUSTOMER
both tables have an [red]EMPID[/red] field.

I made two forms one for each table, EMPLOYEE form and
CUSTOMER form. The EMPLOYEE has only one field the [red]EMPID[/red] field
with a command button(START). When I click on this button it takes me to the Customer form. The CUSTOMER form has information such as FirstName,LastName, and the [red]EMPID[/red] field. Ok with that said.

What I want to do is the following....
when I put lets say [red]7777[/red] for [red]EMPID[/red] on the EMPLOYEE form
and click on the command button which oppens the
CUSTOMER form. I want this form wich contains the [red]EMPID[/red]
field to input the [red]7777[/red] from the previous form to any new customer record on this form not just the first
record it loads. Therefore for any new record created the [red]EMPID[/red] field will be the same [red]7777[/red].

Can you guys plz give me a hand with this, I made a sample
but it seems that no attatchments can be put here, I can send the sample db soo you guys know what I'm talking about.

Thaks in advace.
 
Do not use the on_load, use the on_current. If you want a sample, send me an email asking what you asked in the above post. I will send (and post) the sample. I will not make the sample without someone asking.

rollie@bwsys.net
 
See this thread: 702-567725

I had the same problem and received some worthy knowledge. It should solve your problem.....
 
I don't understand why someone would not post the code unless asked...this is a help forum not a beg for assistance forum...

Here is the Code add this to the On Current Event of the Customer Form:

If isnull(me.EmpID) or me.EmpID = "" then
me.EmpID = [Forms]![EmployeeFormName]![EmpID]
Else
End if

HTH


"I know what you're t'inkin', ma petite. Dat Gambit... still de suave one, no?"
 
jfgambit,

I have not written the code yet. Is that a good enuf reason for you?
 
Logically, if you do not have the code written and do not have time to reply with an example, then I would question why you would respond at all.

Whether or not that is "a good enuf reason" is irrelevant...

The question you should ask is:

"435...does that help?"




"I know what you're t'inkin', ma petite. Dat Gambit... still de suave one, no?"
 
Actually...this whole little side debate could have been avoided if 435 had not posted the same question in multiple forums. Obviously, he got the answer in Access Other Topics and does not need our imput.


"I know what you're t'inkin', ma petite. Dat Gambit... still de suave one, no?"
 
I'm sory if i created the debate but im looking for solution
not conflict.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top