Populate Form (1 Viewer)

selenau837

Can still see y'all......
Local time
Yesterday, 20:53
Joined
Aug 26, 2005
Messages
2,211
I have a simple question I am sure for others.

I have two forms.

Entry form--it is used to load data as well as I want it to be populated and show data when called upon.

Pending form--it shows all pending groups.

The pending form is a continuous form and it has a button with a double click event.

When that button is doubled click, I want the 'Entry Form' load and to be populated with the data that is in the Pending form.
The pending form only shows the EntryId(PK), Group name, and date. The 'Entry form' shows everything.

Since the entry form is used to add/update records in my tables, I wanted to use it to allow the user double click the record in the pending form and bring up that entry form for updating.

MAkeing a long story short, how do I populate the entry form with the records based on the entryID in the pending form.

I've attached a copy of the db incase I don't make sense.
 

Attachments

  • RetroCancels.zip
    107.6 KB · Views: 119

KeithG

AWF VIP
Local time
Yesterday, 17:53
Joined
Mar 23, 2006
Messages
2,592
The problem is when the user press the button Access is not going to know which record the button was pressed from. A possible solution could be to add a Check box field to your table and instead of having the user click the button they could check the box. Does this solution fit your needs? Would you like me to put together an example?
 

selenau837

Can still see y'all......
Local time
Yesterday, 20:53
Joined
Aug 26, 2005
Messages
2,211
KeithG said:
The problem is when the user press the button Access is not going to know which record the button was pressed from. A possible solution could be to add a Check box field to your table and instead of having the user click the button they could check the box. Does this solution fit your needs? Would you like me to put together an example?


Ok, if you would view the entry log, and click that little button by the group name text box, it pops up a continous form. There is an invisitable button across each record that you double click. It then populate the group name text box and closes.

I tried to do something similar, but can't get it to work with that pending form.

I guess a check box would work, but I woudl like to know how instead of having it done for me. I learn better by doing it myself instead of someone doing it for me.
 

KeithG

AWF VIP
Local time
Yesterday, 17:53
Joined
Mar 23, 2006
Messages
2,592
Okay I will tell you what I am going to do then I will post my example. This way you will have time to try it on your own. I am going to add a yes/no field to tblClaims. Then I am going to add the field to the form. On the checkboxes after update event I will query tblClaims for the record whose checkbox is checked and then use this info on the other form.
 

Ascaphus

Registered User.
Local time
Today, 01:53
Joined
Aug 28, 2000
Messages
19
Here's an example that works. I have a form with an unbound subform (though this would work the same way if the subform is bound, or if you use a continuous form) in datasheet view. When I double-click one of the records in the subform, a third form is launched with data from a table where the Record_ID matches the particular record which was double-clicked. So, the data on-screen in the third form depends upon which record you click. You could use the same code for a button on your continuous form. Here we go, this is in the Double-Click event of the subform itself:

Private Sub Form_DblClick(Cancel As Integer)
On Error GoTo Err_Form_DblClick

'create some variables to hold info...
Dim stDocName As String
Dim stLinkCriteria As String
'insert the name of the third (dependent) form you want to open...
stDocName = "Third_Form"
If IsNull(Me.Record_ID) Then
'if you click an empty record you'll go to a new record in the third form
DoCmd.OpenForm stDocName, acFormAdd
Else
'open the record with a matching Record_ID...
'use only one of the following link criteria lines...
'if Record_ID is a number use this line...
stLinkCriteria = "[Record_ID]=" & Me![Record_ID]
'if Record_ID is text use this line...
stLinkCriteria = "[Record_ID]=" & "'" & Me![Record_ID] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
Exit_Form_DblClick:
Exit Sub
Err_Form_DblClick:
MsgBox Err.Number
Resume Exit_Form_DblClick
End Sub
 
Last edited:

KeithG

AWF VIP
Local time
Yesterday, 17:53
Joined
Mar 23, 2006
Messages
2,592
Here is my solution

I made this very quickly so it is sloppy. Is this kinda what you wanted?
 

Attachments

  • RetroCancels.zip
    108.6 KB · Views: 122

selenau837

Can still see y'all......
Local time
Yesterday, 20:53
Joined
Aug 26, 2005
Messages
2,211
Ok, thank you...it is almost time for me to go home. I'll be back Tuesday of next week and let you all know how it worked.

Thank you so much for the help.
 

selenau837

Can still see y'all......
Local time
Yesterday, 20:53
Joined
Aug 26, 2005
Messages
2,211
Solution

I figured out a solution.

instead of a Continuous form, I used an Active X control 'List View'. It allows for the same functionality that I was looking for with the continuous form.

I've attached a copy of the database so you can see how I worked it.

The frmPending Test and frmAllComplete allow for the double click even and then populates the Entry log form with that data.


Hope this helps someone in the future.

Thanks again for those that helped me.
 

Attachments

  • Copy of RetroCancels.zip
    113.1 KB · Views: 133

Users who are viewing this thread

Top Bottom