question

cesarced-8021 avatar image
0 Votes"
cesarced-8021 asked cesarced-8021 published

How to link multiple forms to a single form

i've posted this same issue on this website www.accessforums.net/showthread.php?t=83680

I want to link 6 forms to a single form
calling an especific form with a button based on an option selected on a combobox with this code

Private Sub Command4_Click()
Dim strForm As String

If Me.TipodeTramite = "Licencia Nueva" Then
strForm = "Req1"
ElseIf Me.TipodeTramite = "Cambio de Domicilio" Then
strForm = "Req2"
Else
strForm = "Req3"
End If

DoCmd.OpenForm strForm
End Sub

but when i add data to one of those forms it creates a new record on my table instead of putting it in the same record as my principal form
i use 2 related tables, my "primary" table stores data like "name, number of document... etc"
and the second (called requisitos) stores some requirements for those records
the form called "Datos de Empresa" displays and record data to my primary table
the forms "Req1,2,3,4,5,6" displays and record some fields from requisitos table
for example Req1 have 3 fields of the requisitos table and Req2 have another 5 fields from requisitos and so on

what can i do to link those 6 forms to my principal form?

office-access-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

thedbguy avatar image
0 Votes"
thedbguy answered cesarced-8021 commented

Without seeing your db, it's hard to say why. Can you share a sample copy of your db?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

www.mediafire.com/file/s9nlhno9w80mj44/Database6.accdb/file

here
registro would be an example of the primary form and the others are the ones i want to link to the primary

0 Votes 0 ·
thedbguy avatar image
0 Votes"
thedbguy answered cesarced-8021 commented

Hi. Gracias. What is the purpose of your database? We'll need a little background to offer an appropriate advice.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

the purpose is to save digitalized documents and see some data with the forms like the name of the person, the number of license, and the most important part is to check if the expedient is complete or if lacks some documents
the problem is that there are 6 kind of expedients and every kind has its own requirements to be considered complete
that's why i need 6 different forms linked to a single form to just select the kind of expedient we want to record and show the form with the correspondent requirements of said expedient

0 Votes 0 ·