Solved It does not relate a form to me with its subform (1 Viewer)

zelarra821

Registered User.
Local time
Today, 19:14
Joined
Jan 14, 2019
Messages
803
Well, as I mention in the title, I do not know why in a form that I have with a subform, it does not go well with the code because it is linked to the subform, when it should be done automatically.

The problem here is that it does not save the new records that I enter in the subform.

Could someone help me?

I leave the database. The form is F10TPV.

Thank you.
 

Attachments

  • Nueva base de datos.zip
    746 KB · Views: 31
Last edited:

jdraw

Super Moderator
Staff member
Local time
Today, 14:14
Joined
Jan 23, 2006
Messages
15,364
I don't know your application, but you seem to have a correct main/sub linkage on field
CodigoTicket.



I do not speak/understand Spanish- hopefully another reader can offer advice.
Please give us a more complete description.
Good luck with your project.
 

Attachments

  • LinkageSubForm.PNG
    LinkageSubForm.PNG
    9.4 KB · Views: 150
Last edited:

zelarra821

Registered User.
Local time
Today, 19:14
Joined
Jan 14, 2019
Messages
803
If you try to add new records in the subform, they are not saved when you move from one record to another. I assumed it was because of the ticket code, that it is not copied to the subform, but I do not know why. I already know that the main / sub linkage is fine.
Do you have this clarification?
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:14
Joined
Jan 23, 2006
Messages
15,364
I do note that you do not have Primary keys on some of your tables. This may not be related to your issue, but is a design consideration.

Your database has many tables and many records and without description and a specific record or 2 to review and follow the logic I find it difficult to follow.

Did this just start happening? If so, was something changed or added to the application?
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:14
Joined
Jan 23, 2006
Messages
15,364
The voice level on your video is extremely low --I can not hear it clearly.

I tried to add to record 408. I selected Nokia in articulo, and I put break point in the
Afterupdate event. But the code did not process that event- it did not stop at the breakpoint. So I think something else is happening.I noticed that articulo is unbound, so I don't think a value will be save to the table automatically.

You are using FindAsYouTypeCombo --a class module written by MajP on this forum. You might send him a Private message to see if there is advice he might have or suggest something to you.

Code:
Private Sub Articulo_AfterUpdate()
    Me.SKU = Me.Articulo.Column(2) [COLOR=Red][B][I] <breakpoint here[/I][/B][/COLOR]
    [PVPModificado] = [PVP]
    If Me.TxtCategoria.Value = "Recargas" Then
        Me.TxtCodigoRecarga.Visible = True
        Me.TxtCodigoRecarga.TabStop = True
        Me.TxtTelefonoMovil.Visible = True
        Me.TxtTelefonoMovil.TabStop = True
        Call DarFormatoCondicionalALasRecargas(Nz(Me.TxtCategoria))
    Else
        Me.TxtCodigoRecarga.Visible = False
        Me.TxtCodigoRecarga.TabStop = False
        Me.TxtTelefonoMovil.Visible = False
        Me.TxtTelefonoMovil.TabStop = False
        Call DarFormatoCondicionalALasRecargas(Nz(Me.TxtCategoria))
    End If
    Me.Articulo.Value = ""  [COLOR="Red"]'?????  not sure what this is for ???[/COLOR]
End Sub
It may be more convenient if you could write your detailed description in Spanish, then let Google translate it to English, then post that.

Good luck, sorry I'm not being much help.

Update1:

Does this mean you solved the issue?
The data base is redoing it, and now I just realized the failure.

Update2:
I reviewed your tables again, and now see that all tables have PK???

Update3:
I copied your video to usb and watched on smartTV --sound is OK there at 100, but was almost inaudible on my PC. I don't know the answer.
 
Last edited:

zelarra821

Registered User.
Local time
Today, 19:14
Joined
Jan 14, 2019
Messages
803
The problem is in the design of the subform's source table. I'm trying to create a new subform using the wizard, and it works. However, when I put SQL through the table it should be, it stops working.

I'm sorr'y for the quality of the video.

Then, problem of the majP module is not. That I have given you some error, I do not know why it will be, but I did not fail in the tests.

Thanks a lot.
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:14
Joined
Jan 23, 2006
Messages
15,364
No, your video is fine when I play it on the Smart TV. Seems I don't have enough volume on my laptop??

Again, if you describe your problem/issue/verbiage in Spanish, then use google translate to English and post that result, I'm sure your message will be much clearer to English only readers.

Via Google translate:

Si describe su problema / problema / verborrea en español, luego use google translate to English y publique ese resultado, estoy seguro de que su mensaje será mucho más claro para los lectores que solo están en inglés.

Try it.
 

zelarra821

Registered User.
Local time
Today, 19:14
Joined
Jan 14, 2019
Messages
803
Again, if you describe your problem/issue/verbiage in Spanish, then use google translate to English and post that result, I'm sure your message will be much clearer to English only readers.
Try it.

That's what I do. So, I copy the translate again:

The problem is in the design of the subform's source table. I'm trying to create a new subform using the wizard, and it works. However, when I put SQL through the table it should be, it stops working.

I'm sorr'y for the quality of the video.

Then, problem of the majP module is not. That I have given you some error, I do not know why it will be, but I did not fail in the tests.
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:14
Joined
Jan 23, 2006
Messages
15,364
We need details.
Is this some new issue that has just appeared?
Did this functionality never work?
Can you lead us through the creation of records that show the issue in a manner that we can try step debugging?
Good luck.
 

zelarra821

Registered User.
Local time
Today, 19:14
Joined
Jan 14, 2019
Messages
803
We need details.
Is this some new issue that has just appeared?
Did this functionality never work?

I have tried to delete the current subform, and add a new one using the Access wizard, and it does work. This confirms to me that it is a problem of the origin query of the subform. There is something wrong in that query that causes records not to be saved. I have tried to add the ID in the query, and it does not solve it. Also to add the CodeTicket field in the subform itself, and neither. It gives me what it's about relationships, can it be?

Can you lead us through the creation of records that show the issue in a manner that we can try step debugging?

Are not you worth the video that I uploaded this morning?

Thanks a lot.
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:14
Joined
Jan 23, 2006
Messages
15,364
Is the database you are now working with the same as that in post #1?
If not please post a copy of latest version.

If I delete all records, but 1, then try to add an "aticulo" to it, is that a proper test or is there something else in the application that must be considered?

Yes I did watch the video.

I still do not understand the application.
Can you tell us in 3 or 4 lines about the application. I recognize "punto de venta" as Point of Sale, but that's about all.
 

zelarra821

Registered User.
Local time
Today, 19:14
Joined
Jan 14, 2019
Messages
803
Is the database you are now working with the same as that in post #1?
If not please post a copy of latest version.

There is not a new version of the database. What I published at the beginning is what I'm working with.

If I delete all records, but 1, then try to add an "aticulo" to it, is that a proper test or is there something else in the application that must be considered?

In principle, yes. In fact, I attached the base with a single record. If you try to do what you see in the video, you should give the error. You can see it more clearly if you add the CodigoTicket field. You will notice that you do not copy the CodigoTicket from the main form to the subform. In fact, I send you a copy of the database with a single record.

I still do not understand the application.
Can you tell us in 3 or 4 lines about the application. I recognize "punto de venta" as Point of Sale, but that's about all.
[/QUOTE]

The form in which I have the problem is a point-of-sale terminal. Basically, I use it for a computer store. In it, a ticket code (CodigoTicket) is generated, with a date. You choose the client (by default it is an unknown client). Then, in the subform you can choose the items you are selling, quantity and price (in case you want to change the price that the system gives you). Already in the main form you can select the form of payment (in cash, by bank or transfer), put how much cash delivery, and calculates the change.
 

Attachments

  • Nueva base de datos.zip
    778.9 KB · Views: 26

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 18:14
Joined
Jul 9, 2003
Messages
16,244
He pasado 1 horas buscando en su base de datos de muestra y no tengo idea de por qué no funciona. Creo que deberías responder las preguntas que se te presentan en este hilo, de lo contrario perderás el interés de las personas que intentan ayudarte.

I spent 1 hour looking at your sample database and I have no idea why it does not work. I think you should answer the questions that are presented in this thread, otherwise you will lose the interest of the people who try to help you.
 

zelarra821

Registered User.
Local time
Today, 19:14
Joined
Jan 14, 2019
Messages
803
He pasado 1 horas buscando en su base de datos de muestra y no tengo idea de por qué no funciona. Creo que deberías responder las preguntas que se te presentan en este hilo, de lo contrario perderás el interés de las personas que intentan ayudarte.

I spent 1 hour looking at your sample database and I have no idea why it does not work. I think you should answer the questions that are presented in this thread, otherwise you will lose the interest of the people who try to help you.

Thank you. I believe that I have answered everything I have been asked. If I'm missing something, tell me, because the same thing I did not see the question
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:14
Joined
Jan 23, 2006
Messages
15,364
I think you answered what I asked. But there is a language barrier for me with the application/database. I'm not certain of what you expect and field names, variable names are not helping.
When I go to the form and select Aticulo "Nokia", and change the Quantity to 3 then move off that record, I see Nokia in the control and the revised Costs/Price info . If I do it again and select Articulo "Nanocable.." and change the quantity to 20 I again see revised Price info.



Another screencapture after changing to Nokia.



The Control Articulo in the subform is Unbound, so no data will be recorded automatically as I see it. If you want a table record to be updated then I think you'll need to run a query or recordset code. Which table do you think/want the record to be inserted? See the relationshipsExpanded png file attached.

Perhaps I'm still missing your intent.

Good luck.
 

Attachments

  • NanoArticle20.PNG
    NanoArticle20.PNG
    45.1 KB · Views: 112
  • LastscreenAfterChangingArticulo.PNG
    LastscreenAfterChangingArticulo.PNG
    49.5 KB · Views: 139
  • RelationshipsExpanded.jpg
    RelationshipsExpanded.jpg
    96.7 KB · Views: 27
Last edited:

zelarra821

Registered User.
Local time
Today, 19:14
Joined
Jan 14, 2019
Messages
803
Well, I think we're going to leave it here. Thank you very much anyway for the interest shown in helping me. I hope that on another occasion if you can help me. A greeting.
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:14
Joined
Jan 23, 2006
Messages
15,364
If that is your wish, then so be it.
Your description of your processes does not provide the details I need to help. I am willing to continue, but I have to understand what you are trying to achieve and need to see the logic of how you have implemented or intend to implement the Access/vba to do so.

Your control -Articulo - in the subform is UNBOUND.

I deleted all the subform records. Then was able to add 3 Articles as shown in the graphic. But I do not understand what you want to do further.



I suggest you try again to tell us what should be the result of doing X, Y or Z on your Form/subform.

I watched your video again and am still no closer to understanding the requirement.

To me, your form with subform is quite busy, but if readers knew exactly what your are trying to do, and had some explanation(details) of how you have tried to implement that logic - rather than trying to guess the process and follow the existing code and variables- it would help in getting you some focused assistance.

I'll be away most of the day, but I am willing to pursue this if you provide more clarity in requirement and the logic you have used.

Good luck with your project.
 

Attachments

  • Articulo3_Jun1.PNG
    Articulo3_Jun1.PNG
    65.1 KB · Views: 92
Last edited:

zelarra821

Registered User.
Local time
Today, 19:14
Joined
Jan 14, 2019
Messages
803
Hello

What I'm trying to achieve is to save those records you're adding when moving from one record to another of the main form. If you go to the table F10TPVSubtabla, you will see that they are saved without CodeTicket, which is what links the main form with the subform.

If I told you to quit, it's because I'm not able to express myself more clearly. I have explained what the form is for, and now I have told you what I want to achieve. I say it again with other words: I want that, when I pass of registration in the main form, those records added in the subform are conserved, so that, when I return to the record (of the main form) where are those three records that you have added, stay.

Thank you very much for the effort.

A greeting.
 

Users who are viewing this thread

Top Bottom