Saving changes to records on Form (1 Viewer)

AdmiralN

Registered User.
Local time
Tomorrow, 04:11
Joined
Jul 29, 2019
Messages
31
the Dirty Event of the form will not fire when you programmatically assign value to field. https://bytes.com/topic/access/answers/211945-dirty-event-form-not-firing

I manually enable it from the combo's afterupdate event.

Sorry, the issue now is that the record overwrites the the changes to the first record in the table and not the correct record.

The record navigation at the bottom of the screen remains at '1' even after the record selection is made from the second combo box and the text boxes are updated.
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:11
Joined
May 7, 2009
Messages
19,245
what do you mean?
do you need to show only record for a particular package number from the package combo?
how about the activity, do you also need to get only the record of that activity from same package no?
 

AdmiralN

Registered User.
Local time
Tomorrow, 04:11
Joined
Jul 29, 2019
Messages
31
what do you mean?
do you need to show only record for a particular package number from the package combo?
how about the activity, do you also need to get only the record of that activity from same package no?

Currently the (ignoring the record number ribbon at the bottom of the form) selection of cboPackageNumber and cboActivity functions great for searching and displaying records information i.e. all for the information displayed in the text boxes is the correct information related to that activity in the table.

However, when cboActivity is selected and the activity is chosen the record number (on the bottom ribbon) remains at 1, even though the text boxes are showing information related to the activity selected in the combo box.

Apologies if I'm not explaining this very well, this is exposing my lack of Access knowledge.
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:11
Joined
May 7, 2009
Messages
19,245
here try this one.
I will be out for a while.
I will take a deep look at your db later.
but definitely 1 table is not enough, you need to create 2 more table.
for Package Number and another one for Activities for each Packages.
 

Attachments

  • Productivity Sample - Copy.zip
    110 KB · Views: 88

AdmiralN

Registered User.
Local time
Tomorrow, 04:11
Joined
Jul 29, 2019
Messages
31
here try this one.
I will be out for a while.
I will take a deep look at your db later.
but definitely 1 table is not enough, you need to create 2 more table.
for Package Number and another one for Activities for each Packages.

Thank you very much. This is what I wanted it to do.
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 21:11
Joined
Jan 14, 2017
Messages
18,239
it sounds like your combo is filtering the data to the selected record.
Therefore no matter which item you choose in the combo, the record count in the navigation button area will show 1 of 1.
 

AdmiralN

Registered User.
Local time
Tomorrow, 04:11
Joined
Jul 29, 2019
Messages
31
here try this one.
I will be out for a while.
I will take a deep look at your db later.
but definitely 1 table is not enough, you need to create 2 more table.
for Package Number and another one for Activities for each Packages.

Hi Arnelgp,

The package numbers and descriptions would make sense to be in a separate table as this list is fixed to approximately 40 package numbers, with no additions or deletions anticipated.

The Activities (cboActivity), list however will change, with additions and edits to existing required. Each activity should be unique. Would 2 tables be enough?

Thanks.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:11
Joined
May 7, 2009
Messages
19,245
wanted to share you my form design. very minimal.
 

Attachments

  • Productivity.zip
    46.2 KB · Views: 95

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:11
Joined
May 7, 2009
Messages
19,245
the two tables serve as master table. for daily inputs you need additional table (2 I think). one is the master log. info like which project, when the activity starts, when it was done. the other logs the day by day actual activity or progress, how much manpower was involved, how many manhours, start time, end time, etc.

I know somewhere, there is a manual system or input through excel of all of these. I too work in construction (piping/ oil and gas).

so gather all info, how the paper works flow. from that you can build an idea of how your system will work. you create your app from existing proven system.
 

AdmiralN

Registered User.
Local time
Tomorrow, 04:11
Joined
Jul 29, 2019
Messages
31
Arnelgp,

This is great! Much better than my design.

I hope you don't mind if I use this?

Yes, I work in engineering and construction. This was something I was trying to put together in some downtime.

Thanks again!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:11
Joined
May 7, 2009
Messages
19,245
all are free to try/use. comeback if you have other issues.
goodluck.
 

AdmiralN

Registered User.
Local time
Tomorrow, 04:11
Joined
Jul 29, 2019
Messages
31
all are free to try/use. comeback if you have other issues.
goodluck.

Hi arnelgp,

I would like to create a search combo box on the main form to filter the activities on the Subform. I would like this to work in 2 ways, first so that the user can filter search all activities even without the package selected. The other would be that it filters activities based on the text entered when a package is selected.

I'm wondering the best way to approach this?

Thanks.
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:11
Joined
May 7, 2009
Messages
19,245
check this one.
 

Attachments

  • Productivity.zip
    44.1 KB · Views: 87

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:11
Joined
May 7, 2009
Messages
19,245
you Enable it.same combobox search.
 

AdmiralN

Registered User.
Local time
Tomorrow, 04:11
Joined
Jul 29, 2019
Messages
31
check this one.

Hi arnelgp,

A quick question.

I see on the last file you uploaded all activity records are visible when the form is opened. On the one I have the activities are not shown until the a package is selected from the combo box. What controls this? I've gone through the VB code, but can't identify how this works. Am I looking in the wrong place?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:11
Joined
May 7, 2009
Messages
19,245
sorry there is no search text on the one I posted before.
I change the recordsource of the subform when there is change in combo and search textbox.
 

Attachments

  • Productivity.zip
    44.4 KB · Views: 86

Users who are viewing this thread

Top Bottom