Data in form (1 Viewer)

FilasLam

New member
Local time
Today, 05:31
Joined
Jul 20, 2022
Messages
11
If you want to stay on the same screen, why are you opening a new form? If you want to show the results of the search on the form that does the search, you will have to add a subform to the search form. You will need to change the Recordsource of the subform to include the search criteria.
I don't know how to do it otherwise. Here is the database.
 

Attachments

  • Database registratie1.0.accdb
    3.1 MB · Views: 63

Gasman

Enthusiastic Amateur
Local time
Today, 04:31
Joined
Sep 21, 2011
Messages
14,417
Perhaps see how Allen Browne does a search ?
 

mike60smart

Registered User.
Local time
Today, 04:31
Joined
Aug 6, 2017
Messages
1,914
I don't know how to do it otherwise. Here is the database.
Hi

First of all your relationships between tables is wrong.

You have tables named :-

Exceptions
Overview
Jersey Number
Sheet

Can you explain in simple English what your business process is?
 

mike60smart

Registered User.
Local time
Today, 04:31
Joined
Aug 6, 2017
Messages
1,914
I don't know how to do it otherwise. Here is the database.
If you think about your process of mapping out how tables relate to each other.
Think of the scenario of a Customer on a given day Orders a number of Items.
This process would be made up of a minimum of 3 tables:-

tblCustomers
-CustomerID - PK - Autonumber - Long Integer
-Customername

tblCustomerOrders
-CustomerOrderID - PK - Autonumber
-CustomerID - FK - Number - Long Integer (Linked to the PK from tblCustomers)
-OrderDate

tblOrderDetails
-OrderDetailID - PK - Autonumber
-CustomerOrderID - FK - Number - Long Integer (Linked to PK from tblCustomerOrders0
-ProductID
-Qty
-Cost

If you can relate your current tables in a similar manner it would help us understand your business process.
 

FilasLam

New member
Local time
Today, 05:31
Joined
Jul 20, 2022
Messages
11
Hi

First of all your relationships between tables is wrong.

You have tables named :-

Exceptions
Overview
Jersey Number
Sheet

Can you explain in simple English what your business process is?
The purpose of this database is to fill in new contracts, look up existing contracts and change those. The problem I have only requires table 'overview'. The other tables are used for something different. The problem now is that is can't get the form to show me the data that is in the table overview. When that is solved, then the database will be good for use. Is there anyway to solve this?
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 23:31
Joined
Feb 19, 2002
Messages
43,445
Your database is not in English so we can't figure out what the fields are without putting them one at a time through the translator which we're not going to do. Therefore, we can't make assumptions the way we usually do.

You have four tables but only two are in the Relationship window and those two are not related correctly. You CANNOT relate an autonumber to an autonumber. Autonumbers are generated independently so even for a 1-1 relationship, you cannot ensure that two autonumbers with the same value would even relate to each other.

Add the other two tables and draw the relationship lines correctly. They will go from the autonumber in one table to a data field (not another autonumber) in another table. Mike asked you to tell us in words but you didn't. I'm assuming English is not your native language. Try writing the description in your language (I can't even figure out what it is so I can't translate the other way) and then translating it. Sometimes the translator makes a hash out of a technical topic but we can usually figure it out.
 

FilasLam

New member
Local time
Today, 05:31
Joined
Jul 20, 2022
Messages
11
My problem doesn't have to do with the relations between the tables. My problem has to do with the form not showing the data from 1 table, table 'overview'. I want the form to show me the data that I search for with either 'abonnementsnummer', 'company', 'abonnementsnummer nieuw' or 'beheerder'. so when I look up one, that all the other fields are filled in automatically.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 23:31
Joined
Feb 19, 2002
Messages
43,445
My problem doesn't have to do with the relations between the tables
I beg to differ.

However, I did tell you the solution several posts ago. To remind you, if you don't want to open another form, then you need to display the results using a subform.
 

mike60smart

Registered User.
Local time
Today, 04:31
Joined
Aug 6, 2017
Messages
1,914
My problem doesn't have to do with the relations between the tables. My problem has to do with the form not showing the data from 1 table, table 'overview'. I want the form to show me the data that I search for with either 'abonnementsnummer', 'company', 'abonnementsnummer nieuw' or 'beheerder'. so when I look up one, that all the other fields are filled in automatically.
The only way to do what you need is to have an Unbound Textbox in the header with some VBA to allow you to find the data selected.

I was not able to find a field named "abonnementsnummer nieuw" in your Form?

See the example attached.

You do however need to sort out relationships.
 

Attachments

  • Database registratie1.0.accdb.zip
    654 KB · Views: 69

Cotswold

Active member
Local time
Today, 04:31
Joined
Dec 31, 2020
Messages
527
As I understand it your choices are :
If the form is directly linked to a Query or Table and you edit a field on the form, then tab to another form field, move to a button, or other object, then the change in that field has been saved back to the table.

If you loaded an unbound form with the contents of a record transferred to each of the Form!Fields, then you decide if, or when the changed data is saved back to the Table.

I would reiterate the advice of Arnelgp on post #14 as the main priority.
 

Users who are viewing this thread

Top Bottom