ms access: cree una nueva pestaña de página con un subformulario y complete el subformulario con datos

What I would like to be able to do is when my EditInfo form is loaded, I want to is load the entire client info onto pages.

I want to be able to create a new tab on my TabCtrlEdit tabcontrol on the edit form, add a subform to the new tab and auto populate the subform with data stored in tables.

But I'm a little unsure how to go about this.


EDIT--- A little more info. Each time the client comes they get a new record stored in my visits table. What I would like to do is when the user goes to edit a clients information - It will loop through and give each visit a new tab with the visit subform populated with that visits data. There could be a varying number of these visits so I would like it to be done when the form loads. Right now the EditInfo form just loads the initial visit information (name, ID etc...) but not the rest of the visits as it is stored in a different table.

preguntado el 28 de mayo de 14 a las 13:05

Why must you generate the Tabpages? Can you not just simply hide/show them with the <code>.visible<code> property? And: what is the Editinfo form? What do you mean by "entire client info"? What data from which tables? Be a bit more verbose, please -

Just added some more info -

Why don't you use a Subform for this and set the view mode to singleform? -

What do you mean exactly? Sorry I'm a little confused. -

I assume you have a Client table and a Visits table. Standard procedure in Access would be use the Client table as a recordsource for the mainform and insert a subform which has the Visits table as a recordsource. A subform can have different view options.… -

1 Respuestas

Here is the solution I have implemented thanks to everyone help!

From my main form I load the edit form using this:

DoCmd.OpenForm "frmEdit", acNormal, , "ID='" & txtID.Value & "'", acFormEdit, acWindowNormal

I've got the ID linked to all tables corresponding to my subforms. (Via relationships). And I just set the all the forms on the edit form to "Continuous".

Thanks again to everyone for their help!

Respondido el 16 de junio de 14 a las 14:06

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.