Multiple records in one form

Brecht

New member
Local time
Today, 07:01
Joined
Jul 25, 2009
Messages
7
Hi, I'm new to this forum and I'm already bugging you guys with a problem. I've tried searching for it the past few days but I'm not a native English speaker so I don't know correct terms for it in English.

Anyway here's my problem: I have a form that looks like this
problem1.jpg

I'll explain:
Controleur: Person who sees whether the cars leave on time.
Vervanger: Substitute of the person above.
Datum: Date
WagenNr: Carnumber
Merk: Brand
Nummerplaat: Licenseplate
Dienst: Service
Uur: hour.

Now, I have about 60 cars in my database (60 records) and everytime I want to do a new check up, I have to click the field with the red circle around it and select a car number. I would like to know if there is a way to display all cars at once, without having to click everytime.

Thanks in advance!
 
In Design View for your form, select the form itself and go to Properties - Format and change the Default View to Continuous. I think this will give you what you want.
 
And make sure that the DATA ENTRY property is set to NO.
 
Thank you both for replying!
I've tried both and it doesn't work. Maybe I should've said that the wagenNr's are taken from a linked table.
 
Perhaps if you post a copy of the database we might find the problem much faster.
 
Okay, a couple of questions (since I don't understand the language) -

1. Why do you have two tables (WagensControle and WagensUurControle)? It looks like the data should be in one table, but I'm not sure as I don't know what Uur means. You should not have WagenNr stored in three places.

2. It looks like you also don't have primary keys where there should be some.
 
Yes, I forgot to delete one of them

WagensControle is not used.

Uur means hour.

I'll explain the what the program should be used for.

So there are a number of cars and the time they leave needs to be checked everyday. So I figured there should be a many to many relationship between controles (check ups) and wagens (cars), 'cause 1 controle (check up) contains multiple wagens (cars) and each wagen (car) has multiple controles.

I just need to find a way so each time I do a new check up all the cars can be displayed at once.
 
My guess is you want the control box to show all the values once you're ready to go to the next record? If that is the case, then for Uur_AfterUpdate(), or wagenNr_OnGotFocus() whichever suit your purpose, use this code:

me.wagenNr.setfocus
me.wagenNr.dropdown
 
Hi dear,
Now, I have about 60 cars in my database (60 records) and everytime I want to do a new check up, I have to click the field with the red circle around it and select a car number. I would like to know if there is a way to display all cars at once, without having to click everytime.
Hope it can help you in your project...
 

Attachments

That database you uploaded looks like something I want, but I don't really get how it works to be honest.

I've been thinking, is there a way to get records from 1 table and automatically insert them in another table. For example. I take all WagenNr's that are in the table Wagen and if I add a new control it pastes all those WagenNr's into the table WagensUurControle.

So it would look something like this, but automatically:
This is a first control and all 60 wagenNr's (carnumbers) from table Wagens (cars) are paste into table WagensUurControle (CarHourControl) and they automatically get the same ControleNr (in this case 20) and then the user has to fill in the "Uur" in the form.
table1.jpg
http://img23.imageshack.us/i/table1jpx.jpg
If the user clicks on the add new record button in the form, it should get the same 60 WagenNr's again from the table Wagens and paste them under the WagenNr's which have controleNr 20 and give it a controleNr (in this case 21).
Then my table would look like this:
table2.jpg

I did this manually, but I need it to be automatically, but I don't really know how to do this automatically and it would be rather stupid to just paste it over and over again everytime a new controle will be held.
 
Last edited:
Sorry for double posting.
Okay so I found some sort of way to get what I want but it isn't great.
I made an "add" query so that I can do that autopasting, but now the problem is that it adds too much.

I'll show you some screenshots:
Step one: Press wagens ophalen button

It asks me if I want to add 56 records to the table (which I want)
sample1.jpg


This is the result:
sample2.jpg


Then If I want to do a new check up it asks me this:
sample3.jpg


Add 112 records. This I don't want, 'cause now it adds duplicate records in the first check up, and I can see an exponential growth coming up (56-112-224-448-...) And that's too much.

My guess is that I need some sort of Iif statement but I could be wrong.

Like

If(Controle.controleNr > WagensUurControle.controleNr)
{
Add(Controle.controleNr to WagensUurControle)
}

Something like that but then in access terms. Is that possible?
 
Sorry Dear....... I was on vacation for few days, that's why I didn't reply.
with well I want to ask that why you need to add all records every time.........?

I've been thinking, is there a way to get records from 1 table and automatically insert them in another table. For example. I take all WagenNr's that are in the table Wagen and if I add a new control it pastes all those WagenNr's into the table WagensUurControle.

So it would look something like this, but automatically:
This is a first control and all 60 wagenNr's (carnumbers) from table Wagens (cars) are paste into table WagensUurControle (CarHourControl) and they automatically get the same ControleNr (in this case 20) and then the user has to fill in the "Uur" in the form.

well this could be simple if you create relationship among 2 tables. If 1st table contains wagens details and 2nd contains each wagen's activities then simply create wagenid relationship. You don't need to paste all records every time....

sorry if I didn't understand your question or make you understand properly...
It would better to upload your project with updates that you have made recently....
Thanks.........
 
I figured it out in the meanwhile (on a half assed way, but it works so yeah ;)). Thanks for all your help!
 

Users who are viewing this thread

Back
Top Bottom