PMP Database issues (1 Viewer)

a7mad1990

New member
Local time
Today, 14:17
Joined
Feb 17, 2023
Messages
26
I'm New in Access
I was Design anew database to manage my villas

I need to vba Code to:

1. when i enter the new customer in (Navigation_Form) "The First Tab" and go to "second tab" i need to select that customer to hiring his Project with "Villa Number and Location".
2. in (Q_Cust_Proj_Work) form i need to hiring Works from Table (Works_Help) with filtering Works "Finishing or Structure" and when I click the "Add" Button it will Put Automaticity the "Finishing Works Or Structre Works" to this "Customer" i was Selected.

The Same Idea is On The (Loan) Form
But I need To applicate This Idea To My Database From Form (Q_Cust_Proj_Work) and Table (Works_Help)


I'm Sorry The Database is in Arabic Language

The Database is Attached

PLZ Help Me be Edit My Database Or Get Me VBA Code
 

Attachments

  • 24-2-2023.zip
    2 MB · Views: 94

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:17
Joined
Feb 19, 2002
Messages
43,346
I'm not completely sure I understand the problem but I'll explain how the navigation form works because that is likely your problem.

The built in Navigation Form uses a SINGLE subform control. That means that only ONE form is ever loaded and accessible at one time. So, if you click on a tab to load a different form, your original form is unloaded and the new form gets loaded. This makes it virtually impossible to keep the two forms in sync.

Solution - there are several. Here's three. Depending on how many forms we're talking about as well as they types of interaction, one solution will be better than another OR maybe you will need a combination. Personally, I never use Navigation Forms. I use menus/switchboards to control application access. Most of my apps are way too big for me to fight with the Navigation control which has limited options and some of the main forms have tab controls so multiple related subforms can be loaded with the main form.
1. Add a bunch of hidden controls on the form's header. You will need one to hold the PK of each form so this will be awkward for more than a couple of forms. You then have to modify the RecordSource query of each form to get its PK or FK from the hidden fields. This means your "main" form will always open empty and you will need a search option on the form to find a record. Then in the current event, you will save the PK to the hidden PK field. When the form is a dependent of the main form, then your RecordSource query will use the hidden PK field to populate this form's FK and also use it to filter the query to return only related records.
2. Create your own navigation form just like the experts do now. Each subform will normally be shown in a separate control that appears on a specific tab. This makes the form "heavy" since all the controls are loaded with forms when the main form loads so you have to weigh that in your design.
3. Use a popup form or even a popup Navigation Form to drill down.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:17
Joined
May 7, 2009
Messages
19,247
PLZ Help Me be Edit My Database Or Get Me VBA Code
unable to open your database, missing reference on Camtasia.
even if i am able to open it there is no guarantee that i can edit your form
since you made it in Arabic Office.
 

a7mad1990

New member
Local time
Today, 14:17
Joined
Feb 17, 2023
Messages
26
unable to open your database, missing reference on Camtasia.
even if i am able to open it there is no guarantee that i can edit your form
since you made it in Arabic Office.
the database make by office 2021 English but the data in Arabic Language
 

a7mad1990

New member
Local time
Today, 14:17
Joined
Feb 17, 2023
Messages
26
Hello I need VBA Code To:

  • Pic1: When Open Form "Q_Cust_Proj_Work" and Click on button No.1
  • Pic2: and select the items on Form "Works_Help" by filter them uses Combobox No.2 and click button No.5 it automatically copy that selected items No.4 to "Q_Cust_Proj_Work".
  • Pic3: Finally Generate New ID Start With Number 1 to etc. selected and when I Click Button No.8 it will delete all items.


that I mean


Thanks For All

Ahmed Amer
 

Attachments

  • 3-03-2023.zip
    2.1 MB · Views: 74
  • 1.png
    1.png
    94.1 KB · Views: 85
  • 2.png
    2.png
    157.9 KB · Views: 83
  • 3.png
    3.png
    201.4 KB · Views: 83

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:17
Joined
May 7, 2009
Messages
19,247
too many "missing reference"...
 

a7mad1990

New member
Local time
Today, 14:17
Joined
Feb 17, 2023
Messages
26
make by office 2021 English but the data Entry in Arabic Language PLZ Help ME
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:17
Joined
May 7, 2009
Messages
19,247
i remove some "missing reference" from your database (i don't have them).
so what you need to do is test first this db if it is ok for you.
if it is ok, what you need to do is:

1. Copy TblWorksOnly (i change the structure) to your db (replace your table).
2. Copy Form Q_Cust_Proj_Work to your db.
3. Copy Form Q_Cust_Proj_Work_Subform to your db.
4. Copy Module Module1 to your db.

or just re-instate all reference back in VBA on this db.


//Edit i just copied the forms/table myself so the attached db is not yet tested.
 

Attachments

  • 3-03-2023.zip
    2.1 MB · Views: 103
Last edited:

isladogs

MVP / VIP
Local time
Today, 12:17
Joined
Jan 14, 2017
Messages
18,246
7 missing references but it compiled without them...possibly only because Option Explicit is missing on several code modules
 

a7mad1990

New member
Local time
Today, 14:17
Joined
Feb 17, 2023
Messages
26
I have 4 departments in the company and I want to make this database as an automatic incoming and outgoing system between users so that each user enters his name and password and sends letters, records and files as rows to the concerned departments and the user name is attached to the application

I've made a table called "outgoing" so what's next?
 

Attachments

  • 16-3-2023.zip
    2.2 MB · Views: 77

isladogs

MVP / VIP
Local time
Today, 12:17
Joined
Jan 14, 2017
Messages
18,246
Sorry but I don't have time to look at this further. Hopefully someone else will do so.
Have you sorted out the 7 unused references yet?
 

isladogs

MVP / VIP
Local time
Today, 12:17
Joined
Jan 14, 2017
Messages
18,246
As previously stated, 7 references are marked as MISSING
1679328072748.png

I unticked all of those and the code compiled. Therefore, none of those references are being used. You should remove them
 

Users who are viewing this thread

Top Bottom