transfer data to other tables ? (1 Viewer)

Cyberslam

Registered User.
Local time
Yesterday, 16:16
Joined
Sep 1, 2005
Messages
35
ScottGem said:
You have to enter at least three pieces of data here; the new filled date, the amount that was filled and the vehicleID. If you are using a subform where the main form is bound to the Vehicle table, then the last piece is automatic.

I can't really understand this .. Can you please explain this ? When we enter a new record every month for a particular car and employee of thier petrol usage we will have to enter all the data in petrol usage table everymonth which i don't want.

Any help ? I am new to Access so please guide me ..
 
Last edited:

ScottGem

Registered User.
Local time
Yesterday, 19:16
Joined
Jun 20, 2005
Messages
1,119
You said; "In short, i want to have records of everymonth when the petrol is filled in a particular car of a particular employee."

To have a record for each month, you have to create a NEW record for each month. Otherwise you are just storing the last months usage for a vehicle without any history. I don't see much value in that.

Since you have to enter a NEW record you need at least three pieces of info as I indicated. You need to enter the date so you know what period the record is for. You need to enter an amount so you know how much was used. Whether you only store the last period's usage or a record for each period you still have to enter those TWO pieces of info. The third piece, the Vehicle Code NEEDS to be in the record. If you are only storing the last period, then you are changing value on an existing record so the Code is already there. If you are using a subform to enter usage and the main form is bound to the Vehicle table linked on Vehicle code, then Access will automatically fill it in. But if you are just entering the data directly into a form bound to the usage table, then you need to enter the Vehicle Code.
 

ScottGem

Registered User.
Local time
Yesterday, 19:16
Joined
Jun 20, 2005
Messages
1,119
Please don't link databases externally. If you want us to check your work, ZIP it and attach to a note here.
 

Cyberslam

Registered User.
Local time
Yesterday, 16:16
Joined
Sep 1, 2005
Messages
35
^ here it is again.

Username = Admin
PAss= home2000

( IF It asks for it )
 

Attachments

  • DRC Transport Database.zip
    93.6 KB · Views: 64

ScottGem

Registered User.
Local time
Yesterday, 19:16
Joined
Jun 20, 2005
Messages
1,119
I'm going to try this one more time. This makes NO sense. The Petrol Usage date table makes no sense. I don't know how else I can word it.

Is the Petrol Card amount the same for every month? Again, you NEED to have the three pieces of data I listed in each record.
 

Cyberslam

Registered User.
Local time
Yesterday, 16:16
Joined
Sep 1, 2005
Messages
35
lets make it simple...i would simply like to enter the total petrol used every month and not record the details of when it was filled - just the total petrol usage every month... can you provide your insights on this?
 

ScottGem

Registered User.
Local time
Yesterday, 19:16
Joined
Jun 20, 2005
Messages
1,119
I don't know what it takes to get through to you on this. You just aren't making sense. Why can't you see you need THREE pieces of info? There is no way to do this with anything less than THREE pieces. You need the petrol used, the period during which it was used and the vehicle that used it. This is the absolute minimum of info. Doing anything else is meaningless.

As I've said several times you can automate entering the VehicleCode by entering the data as a subform of a main form bound to the Vehicle table. You can also semi automate the period by using an unbound control to enter the period once and then setting the default value of the period control to that unbound control. So all you need to enter for each record is the usage amount.
 

Cyberslam

Registered User.
Local time
Yesterday, 16:16
Joined
Sep 1, 2005
Messages
35
ScottGem, i know i gave you a hard time during all this discussion and i am really thankful to you for bearing this with me :)

Now i have this last request for you. As i have attached the database, can you please make the changes that you think should be made to this DB. It will be easier for you and me to understand. I am sure this will be a learning thing for me. Can you please do it ?

Thanks alot ..
 

ScottGem

Registered User.
Local time
Yesterday, 19:16
Joined
Jun 20, 2005
Messages
1,119
First there is no attachment, second, no I won't do the work for you. I've given you more than enough information to make these changes yourself. If you want to make the changes and post your results for us to review, that's fine. But I'm not going to do the work for you, unless you are willing to contract for my services.
 

Cyberslam

Registered User.
Local time
Yesterday, 16:16
Joined
Sep 1, 2005
Messages
35
^ There is a attachment but i understand. It won't be possible for you. I have to do this myself.

One more thing, is there anyway to do this: ?

For example, i have 2 fields " Vehicle Code" and Employee Code". I have added a new record, entered Petrol usage ID ( Auto no. ) selected vehicle and employee code from the combo box. What now i would like to do is when i enter a new record for the same vehicle and employee code, i would like employee code to be automatically selected when i select vehicle code from combo box.

I saw this in some example DBs but couldn't figure out. Is there anyway of this ?

Thanks
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:16
Joined
Feb 19, 2002
Messages
43,302
How are you going to enter the data? By employee or by vehicle? You should be able to minimize your data entry if you use the correct organization of forms/subforms as has already been suggested.
 

Cyberslam

Registered User.
Local time
Yesterday, 16:16
Joined
Sep 1, 2005
Messages
35
Employee and Vehicle will be entered in thier respective tables.

Can you please tell me how to do what i said in my last post ?
 

ScottGem

Registered User.
Local time
Yesterday, 19:16
Joined
Jun 20, 2005
Messages
1,119
Review the info I gave you about Subforms. You do this by entering the usage in a subform where the main form is your Vehicle table. However, you can't automatically select Employee unless the employee is tied to the vehicle. In that case you can lookup the employee on the Vehicle record.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:16
Joined
Feb 19, 2002
Messages
43,302
Employee and Vehicle will be entered in thier respective tables.
I hope you mean forms. But that wasn't the data we were talking about. We were talking about petrol usage data. How do you forsee entering that - by employee or by vehicle? As has already been suggested, you would use a subforms to manage the data entry. For example a subform on the employee form to show vehicles assigned to that employee and then a subsubform to enter petrol usage. From the vehicle perspective, you should have only one employee assigned so you only need a subform for petrol usage entry.
 

Cyberslam

Registered User.
Local time
Yesterday, 16:16
Joined
Sep 1, 2005
Messages
35
Pat Hartman, I do understand you but my requirements is to do what i said in my above post. By using the subform the data would increase too much that it will be difficult to manange it as we have to scroll down every time we enter data in data entry fields.

So any help ?
 

ScottGem

Registered User.
Local time
Yesterday, 19:16
Joined
Jun 20, 2005
Messages
1,119
Cyberslam said:
Pat Hartman, I do understand you but my requirements is to do what i said in my above post. By using the subform the data would increase too much that it will be difficult to manange it as we have to scroll down every time we enter data in data entry fields.

So any help ?

That is not true. First, only the usage for the specific vehicle or Employee (depending on what the main form is) will show. Second, all you have to do is press the new record button. to get to the new record.
 

Cyberslam

Registered User.
Local time
Yesterday, 16:16
Joined
Sep 1, 2005
Messages
35
^ I think you didn't get me there.

Anywayz, i am attaching a sample of what i am trying to do here. Its examples of comoboxes. Goto the example of "Lookup" and when you select a "employee number", the data below it automatically comes in the fields. Thats what i am trying to do here..

Does anyone knows how to do this ?

(Password= Admin, Pass= home2000, if it asks for it)
 

Attachments

  • dbCombos.zip
    46.2 KB · Views: 72

ScottGem

Registered User.
Local time
Yesterday, 19:16
Joined
Jun 20, 2005
Messages
1,119
First, all you have to do is look at the form in Design mode and you can see how it was done.

Second, That is not, however, what you want or need to do. The Lookup example (and there are several ways to do that) is useful when you want to select a value and see the rest of the info pertaining to that value. That's NOT what you need to do.

You have been asking about inputting a monthly record of petrol usage. We have told you several times in detail how to do that.
 

Users who are viewing this thread

Top Bottom