By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,916 Members | 1,286 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,916 IT Pros & Developers. It's quick & easy.

Need help on continous forms please

P: n/a
I have been looking for a way to figure out how to pass specific record
information from a continuous form onto another form. What I have done
was created a button in the detail section to open another form. This
form has text boxes and I linked their properties to the first form,
but it pulls the first record's information instead of the one the
button is next to. How can I accomplish this?

I have been looking for information for a few days now and have given
in to start a new topic. Your help is very much appreciated.

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
The other form needs to be open. Then enter the following code in the Click
event of the leftmost field in the continuous form:
Forms!NameOfOtherForm!NameOfField1 = Me!NameOfField1InOtherForm
Forms!NameOfOtherForm!NameOfField2 = Me!NameOfField2InOtherForm
Forms!NameOfOtherForm!NameOfField3 = Me!NameOfField3InOtherForm
....
....
etc

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com


<La*****@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I have been looking for a way to figure out how to pass specific record
information from a continuous form onto another form. What I have done
was created a button in the detail section to open another form. This
form has text boxes and I linked their properties to the first form,
but it pulls the first record's information instead of the one the
button is next to. How can I accomplish this?

I have been looking for information for a few days now and have given
in to start a new topic. Your help is very much appreciated.

Nov 13 '05 #2

P: n/a
Use the primary key of the record in the form to open the other form to the
same record.

This example shows the Event Procedure you could use for a command button
named OpenThisRecord, assuming a primary key named ID:

Private cmdOpenThisRecord_Click()
Dim strWhere As String
If Me.Dirty Then
Me.Dirty = False 'Save
End If
If Me.NewRecord Then
MsgBox "Select a record."
Else
strWhere = "[ID] = " & Me.ID
DoCmd.OpenForm "Form2", WhereCondition:=strWhere
End If
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<La*****@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I have been looking for a way to figure out how to pass specific record
information from a continuous form onto another form. What I have done
was created a button in the detail section to open another form. This
form has text boxes and I linked their properties to the first form,
but it pulls the first record's information instead of the one the
button is next to. How can I accomplish this?

I have been looking for information for a few days now and have given
in to start a new topic. Your help is very much appreciated.

Nov 13 '05 #3

P: n/a
Please be more specific... if the record on the continuous forms view form
had not been saved, you could save it and then use the WhereCondtion
argument of DoCmd.OpenForm to open the new form to the same record.

I do not understand what you mean by "linked their properties to the first
form". Do you mean you are trying to set the values of the controls on the
newly-opened form to the values in the corresponding controls in the current
record of the continuous forms view form? If so, then you need to explain
_how_ you are doing so.

Larry Linson
Microsoft Access MVP
<La*****@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I have been looking for a way to figure out how to pass specific record
information from a continuous form onto another form. What I have done
was created a button in the detail section to open another form. This
form has text boxes and I linked their properties to the first form,
but it pulls the first record's information instead of the one the
button is next to. How can I accomplish this?

I have been looking for information for a few days now and have given
in to start a new topic. Your help is very much appreciated.

Nov 13 '05 #4

P: n/a
thanks for all the help everyone. i figured out how to do it. on the
button in the detail section of the first form it opens a second form.
on the second forms load event i used the code in the first reply and
it brings over information i need. thanks a lot again.

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.