Solved Txt box on Form to add data (1 Viewer)

KitaYama

Well-known member
Local time
Today, 16:00
Joined
Jan 6, 2022
Messages
1,540
Thanks KitaYama....there's an error popping up on the AfterUpdate event about communicating with the OLE server ?
It's because I'm using a non-English version of Access.
Copy the event to your own database.
 
Last edited:

KitaYama

Well-known member
Local time
Today, 16:00
Joined
Jan 6, 2022
Messages
1,540
Thanks KitaYama....there's an error popping up on the AfterUpdate event about communicating with the OLE server ?
Check this version.
 

Attachments

  • Database5.accdb
    448 KB · Views: 19

CJ_London

Super Moderator
Staff member
Local time
Today, 08:00
Joined
Feb 19, 2013
Messages
16,604
I was wondering if there's a way of doing it without the PK ?
For my method, you need a unique field that represents the order. This would usually be the PK (autonumber field). If you don't have a PK, then my method won't work

CJ the boxes are just blank when i try adding new records
Sounds like the code isn't running - you have enabled to code?
The records are entered into the database using a scanner.
Would have been helpful to know that - does the scanner also populate the weight control? If so, then you probably need to use a different event to populate the values - such as the form before update event.

You have numerous other suggestions, so I'll bow out
 

Emma35

Registered User.
Local time
Today, 00:00
Joined
Sep 18, 2012
Messages
467
It's because I'm using a non-English version of Access.
Copy the event to your own database.
Thanks KitaYama this version looks promising........i need to get a couple of boring meetings out of the way before i can give it a proper try. Cheers
 

Emma35

Registered User.
Local time
Today, 00:00
Joined
Sep 18, 2012
Messages
467
Code:
=DSum("[Weight]","[tbl_MainRecords]",)
If you really have a comma at the end, that may be a problem when using a function. If no criteria remove the comma.
Thanks MajP i'll try omitting it and see what happens
 

KitaYama

Well-known member
Local time
Today, 16:00
Joined
Jan 6, 2022
Messages
1,540
Thanks KitaYama this version looks promising........i need to get a couple of boring meetings out of the way before i can give it a proper try. Cheers
I changed the code in post #5.
Download it again.
You can click the record selector to add to the calculation or remove from it.
 

Emma35

Registered User.
Local time
Today, 00:00
Joined
Sep 18, 2012
Messages
467
I changed the code in post #5.
Download it again.
You can click the record selector to add to the calculation or remove from it.
Hi KitaYama your suggestion works perfectly thank you. It was initially generating some kind of syntax error but i shut down the database and opened it again and all was fine. Thanks again for taking the time to help and also to everyone who made suggestions....i'm always amazed at the help and support i get from you guys.

Emma xx
 

Users who are viewing this thread

Top Bottom