Create new record on other form

R

Rpettis31

I have an issues form that is filled out by customer service with a yes.no
for follow up on the form. Is there a way once yes is selected on the issues
form the follow up form assigns a number and pulls the selected fields into
the new form.

Thanks
Robert
 
J

John W. Vinson

I have an issues form that is filled out by customer service with a yes.no
for follow up on the form. Is there a way once yes is selected on the issues
form the follow up form assigns a number and pulls the selected fields into
the new form.

Thanks
Robert

I expect there is, but it would help us a lot if you would describe the nature
(recordsource, table relationships, etc.) of the issues form, the followup
form, what number you want to assign, and what you mean by "the selected
fields".
 
R

Rpettis31

I think what I need is an on click event of if Yes is selected the other form
is there in add mode. Any ideas?
 
K

Klatuu

You would actually want to use the After Update event of the Check Box control.

If the value of the Check Box is True, then open the other form. Now, the
other part, as John pointed out, is that you don't give enough info to know
what fields need to be used in the form. Are you wanting to add data to an
existing record or are you creating a new record. More detail would help.
 
R

Rpettis31

I intended the event to open another form in add mode (new record). The form
would pull fields from the original form. Such as Item #, the issue #.Which
are already on this form then the form would be new in this instance.
 
K

Klatuu

Okay, great.
Then, as I said earlier, if the check box is True, then open the other form.
If your current form is still open, you can copy the values from the
controls on that form:

If Me.MyCheckbox = True Then
Docmd.OpenForm......
End If

Then in the Load event of the add form:

Me.SomeControl = Forms!TheOtherForm!ControlName
....
 
S

Shimon

Hi David,
You pointed him in the right direction BUT, if this second form is used
in other contexts when the first form is not open, the Load event will
cause and error.
a solution for this would be to use a solution I read (and have the code
for) that checks if a specific form is open and then runs the code.
If you need this code give a holler and I hope I'll have time to find
and send it.

All da Best,
Shimon
 
K

Klatuu

I am familiar with what you are talking about. I have a function I call that
has the code in it. You are correct, it is a good habit to check for the
existance of another object before usinging if there is any doubt as to
whether it will be available or not.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top