Visa Database (2 Viewers)

Grumm

Registered User.
Local time
Today, 03:30
Joined
Oct 9, 2015
Messages
395
To populate a combobox you just need to put the query in the Row source and set the Row source type to table/query.



A list box just show all the data. The combo box you see only the selected data. You can pick a new one with a dropdown menu.
The listbox doesn't have a dropdown menu.
 

Attachments

  • 2016-11-10_090648.jpg
    2016-11-10_090648.jpg
    22.1 KB · Views: 184

rascot123

Registered User.
Local time
Today, 07:00
Joined
Jul 30, 2016
Messages
33
At least tell me how to search for different category visa for Dubai itself. Once I get this idea I will understand. Explain with example please.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 02:30
Joined
Jul 9, 2003
Messages
16,360
These videos should get you started:-

https://sites.google.com/site/msaccess457966vmfjg/form-controls/combo-boxes/combo-box-videos

Sent from my SM-G925F using Tapatalk
Follow the Videos in this link. If you get to a place in the video you don't understand, then post a time indexed link from the video and explain what you are having difficulty with and I will try to help you out.



Sent from my SM-G925F using Tapatalk
 

rascot123

Registered User.
Local time
Today, 07:00
Joined
Jul 30, 2016
Messages
33
I wait for anybody's reply for my question. Please educate me how to do combo box with an example in my database. Anybody there for this? Would appreciate.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 02:30
Joined
Jul 9, 2003
Messages
16,360
You have received replies.

Sent from my SM-G925F using Tapatalk
 

Grumm

Registered User.
Local time
Today, 03:30
Joined
Oct 9, 2015
Messages
395
I would give you examples with fields of your database. But what do you already have as database ? Can we get a demo version of what you have ?
 

rascot123

Registered User.
Local time
Today, 07:00
Joined
Jul 30, 2016
Messages
33
let me put this way.
I have four fields in my form.
ID#
VISA CATEGORY
COUNTRY
MEMO
in ID# will be 1,2,3 serial numbers. VISA CATEGORY will explain as :
Dubai tourist visa 1 month
Dubai tourist visa 3 month
Dubai leisure visa 1 month
Dubai leisure visa 3 months
Bahrain tourist visa 1 month
Bahrain business visa 3 months
Oman tourist visa 1 month
Oman business visa 3 months
so on......
Field of "VISA CATEGORY" in my form I need as a combo box.
I want to use combo box to search. Once I select VISA CATEGORY as combo box
whole fields have to change as per my selection of combo box. I hope you guys
got my point. Please explain in simple way, because I am growing student in this
field. I tried several time to achieve this skill. But I could not do. If I get favor from anybody a to z information I can do this.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 02:30
Joined
Jul 9, 2003
Messages
16,360
I don't think I can help you.

The first problem is I don't think you can hear me.

The second problem is you don't appear to be making any progress.

The purpose of this forum is to help you become a better programmer, it's not to provide you with the code you need. Code is provided from time to time, usually when the OP (that's you) demonstrates that they are interested and willing to learn.

Sent from my SM-G925F using Tapatalk
 
Last edited:

rascot123

Registered User.
Local time
Today, 07:00
Joined
Jul 30, 2016
Messages
33
Dear Sir
I like your reply very much. I don't have much idea programming.
So I like only wizards in access and tables so on... as I usually do.
That is what only I expect from you too. This is the reason why I want you to
exucate me from you COMBO BOX
 

Grumm

Registered User.
Local time
Today, 03:30
Joined
Oct 9, 2015
Messages
395
Well, when you add a combobox in access, you can actually use a wizard to get the data you want. But yes for the second one you need a little knowledge of sql and vba.
 

rascot123

Registered User.
Local time
Today, 07:00
Joined
Jul 30, 2016
Messages
33
Do I need to know VBA just for creating a combo box for my simple database?
You can just give me how to do that in step by step wizard.
 

rascot123

Registered User.
Local time
Today, 07:00
Joined
Jul 30, 2016
Messages
33
Great! I achieved what I want. I got idea of wizard in combo box. done.

How to hid table design view, table view?
because I do not want to show those things to users.
How to give password in my ms access database?
How to hide a box in my form? Once I need that hidden box I need to bring out that by a double click or by similar thing. How?
I hope you got me.
 
Last edited:

rascot123

Registered User.
Local time
Today, 07:00
Joined
Jul 30, 2016
Messages
33
When you select a country, it will show you all the visa's from that country.
How to do this things ? Please reply also.
 

Grumm

Registered User.
Local time
Today, 03:30
Joined
Oct 9, 2015
Messages
395
Well in the RowSource proprety of the visa dropdown-box there is a query :
Code:
SELECT Visa_Category.Id, Visa_Category.Visa_Name FROM Visa_Category WHERE (((Visa_Category.FK_Country)=[forms]![Demo_Form]![Selection_Country])) ORDER BY Visa_Category.Id;
So basicly it will select all the visa records that are linked to the selected country.
Then there is a small VBA code to trigger the update :
Code:
Private Sub Selection_Country_Change()
    Dim ctlCombo As Control
 
    ' Return Control object pointing to a combo box.
    Set ctlCombo = Me.Selection_Visa
 
    ' Requery source of data for list box.
    ctlCombo.Requery
End Sub

Of course that code is a little overkill and can be done in 1 line. But this was only to show you vba code.
So yes, you need to know VBA code in order to program in Access.
(Or you can record macro's)
 

Users who are viewing this thread

Top Bottom