Form Problem (1 Viewer)

Bandara

Member
Local time
Tomorrow, 01:06
Joined
Apr 17, 2020
Messages
60
Hello

I am Very Very New Student For MS Access.I have a Problem in my Access Data base

I have Tables
1. BusStops

It has these fields.
  • BusStopID
  • BustopName
2. BusFare

In this table Have these fields

  • StartBusStop
  • EndBustop
  • Fare
As a example i entered fare for between two bus top. as example StartBusStop = A, EndBusStop = B , Fare =120

3.Journey

Inhere I Created 3 fields.
1.Start
2.End
3.Amount

Then I created a form to add data to this table. In the form i use combo boxes for Start and End fields by using data of the BusStops Table. So now i want to auto generate Bus Fare when i select Start and End Bus Stops. Bus fare is already added to BusFare Table.

As a example what i need,

When i select in my form combo box
Start = A
End = b
I want to generate fare amount by using Busfare table automatically.

It's better to tell me simple way to do that

Thank You.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:36
Joined
Oct 29, 2018
Messages
21,473
Hi. Welcome to AWF!

I am thinking you should be able to use the DLookup() function for this.
 

Bandara

Member
Local time
Tomorrow, 01:06
Joined
Apr 17, 2020
Messages
60
Hi. Welcome to AWF!

I am thinking you should be able to use the DLookup() function for this.
I Dont know to Use DLookup Can u tell me how to use it
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:36
Joined
Oct 29, 2018
Messages
21,473
I cant understand any thing
Perhaps you will understand better with an example. Can you post a sample copy of your db with test data? We can then show you how to do it.
 

Bandara

Member
Local time
Tomorrow, 01:06
Joined
Apr 17, 2020
Messages
60
Here the file
 

Attachments

  • Data.zip
    139.8 KB · Views: 102

Bandara

Member
Local time
Tomorrow, 01:06
Joined
Apr 17, 2020
Messages
60
Perhaps you will understand better with an example. Can you post a sample copy of your db with test data? We can then show you how to do it.
 

Attachments

  • Data.zip
    139.8 KB · Views: 107

Bandara

Member
Local time
Tomorrow, 01:06
Joined
Apr 17, 2020
Messages
60
THank You It Works.

But

Is there any way to do this.
A to B - 12
B to A - 12

In form is there any ways to do that by adding only A to B Fare amount or is it mandatory to add data to both Side (A to B and B to A)
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:36
Joined
Oct 29, 2018
Messages
21,473
THank You It Works.

But

Is there any way to do this.
A to B - 12
B to A - 12

In form is there any ways to do that by adding only A to B Fare amount or is it mandatory to add data to both Side (A to B and B to A)
See if this is what you mean...
 

Attachments

  • ITCW.zip
    47.7 KB · Views: 105

Bandara

Member
Local time
Tomorrow, 01:06
Joined
Apr 17, 2020
Messages
60
See if this is what you mean...
es. It's Correct.

Now I want deduct the fare amount from card balance. In there i created CardDetail table and that table have a Field Called Balance. It Have CardNo field and StartJourney Also have CardNo field. I want to input CardNo in the form and deduct the fare amount form relevent card. Can u tell me how to that
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:36
Joined
Oct 29, 2018
Messages
21,473
es. It's Correct.

Now I want deduct the fare amount from card balance. In there i created CardDetail table and that table have a Field Called Balance. It Have CardNo field and StartJourney Also have CardNo field. I want to input CardNo in the form and deduct the fare amount form relevent card. Can u tell me how to that
Ah, for that, you might be able to use DSum()

 

Bandara

Member
Local time
Tomorrow, 01:06
Joined
Apr 17, 2020
Messages
60
Can u help me to do that one. That fare amount want to deduct from the cardDetails table card balance
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:36
Joined
Oct 29, 2018
Messages
21,473
Can u help me to do that one. That fare amount want to deduct from the cardDetails table card balance
Hi. I'll see what I can do when I get back in front of a computer. In the meantime, you can give it a try, or at least, add the gift card to the form and repost your db.

Sent from phone...
 

Bandara

Member
Local time
Tomorrow, 01:06
Joined
Apr 17, 2020
Messages
60
Hi. I'll see what I can do when I get back in front of a computer. In the meantime, you can give it a try, or at least, add the gift card to the form and repost your db.

Sent from phone...
Thank You Can U Do it for me. I was created And Update My database. Shall I Send it now?
 

Users who are viewing this thread

Top Bottom