By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,827 Members | 2,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,827 IT Pros & Developers. It's quick & easy.

{Solved} - Combobox List

100+
P: 173
hi,

i have got my combobox working. The combobox allows users to select a mobile phone user and it automatically populates the form with the details such as imei number, phone number, issue date etc etc.

The details are extracted from a table called tab_main.

The question is........ when i select a user from the combobox it shows me the details on a form on the same page. How can i show the details that appear in the form on a separate window? a window that comes over the combobox page?
Nov 11 '06 #1
Share this Question
Share on Google+
11 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
hi,

i have got my combobox working. The combobox allows users to select a mobile phone user and it automatically populates the form with the details such as imei number, phone number, issue date etc etc.

The details are extracted from a table called tab_main.

The question is........ when i select a user from the combobox it shows me the details on a form on the same page. How can i show the details that appear in the form on a separate window? a window that comes over the combobox page?
Assuming new form is created with tab_main as the record source.

In the code that opens the other form change the code to:

DoCmd.OpenForm "FormName", , , "[UserNameField]='" & Me.comboboxname & "'", , acDialog
Nov 12 '06 #2

100+
P: 173
It could be a simple thing, ive used the following code in EVENT AFTER UPDATE, but it doesnt introduce a new window that shows the details once a username is selected in the combobox. What am i doing wrong? i am new to access.......
Please explain in simple terms thanks
-------------------------------------------------------------------------
Option Compare Database

Private Sub Combo24_AfterUpdate()

DoCmd.OpenForm "formtest", , , "[username]='" & Me.Combo24 & "'", , acDialog


End Sub

-----------------------------------------------------------------------
Nov 12 '06 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Have you actually created the form "fromtest" based on the appropriate table as the record source. This code simply opens the form and filters the results. It doesn't create it.

It could be a simple thing, ive used the following code in EVENT AFTER UPDATE, but it doesnt introduce a new window that shows the details once a username is selected in the combobox. What am i doing wrong? i am new to access.......
Please explain in simple terms thanks
-------------------------------------------------------------------------
Option Compare Database

Private Sub Combo24_AfterUpdate()

DoCmd.OpenForm "formtest", , , "[username]='" & Me.Combo24 & "'", , acDialog


End Sub

-----------------------------------------------------------------------
Nov 12 '06 #4

100+
P: 173
yes bud,

i have created the form "formtest". In this form it has all the details extracted from the table tab_main. I have created a new form with just a combobox that allows the user to select a username. This is where im stuck, i honestly do not know what to do from here..........................

im probably doing sumat wrong that it obvious but i aint pickin it up.

If you can please provide me the full code.......... my knowledge is not at the stage of modifying yet.

Thanku
Nov 13 '06 #5

MMcCarthy
Expert Mod 10K+
P: 14,534
yes bud,

i have created the form "formtest". In this form it has all the details extracted from the table tab_main. I have created a new form with just a combobox that allows the user to select a username. This is where im stuck, i honestly do not know what to do from here..........................

im probably doing sumat wrong that it obvious but i aint pickin it up.

If you can please provide me the full code.......... my knowledge is not at the stage of modifying yet.

Thanku
That is the full code ...

If you can answer these questions I will try to work out whats going on.

1. Are you getting an error message.

2. In the properties window of the combo box under events is [Event Procedure] showing in the After update window.

3. In the properties what is showing under the data tab in the Row Source property and the bound column property.

4. In the format tab what is showing in the column count property.
Nov 13 '06 #6

100+
P: 173
some bloke gave me an example of a simple combobox that filters a form.

i get the following error:

"Syntax error (missing operator) in query expression 'username = John Pearson'."

I get this error code no matter which name i select......

2. In the properties window of the combo box under events the [Event Procedure] is showing

3. In the properties under the data tab in the Row Source property, it shows table\query and the bound column property shows 1.

4. In the format tab the column count property shows 1.
Nov 13 '06 #7

NeoPa
Expert Mod 15k+
P: 31,299
If you're filtering by a string it must EITHER be in a variable OR surrounded by quotes.
In your case Username = 'John Pearson'.
BTW You've posted the value in the 'Row Source Type' property but the 'Row Source' property is the interesting one.
Nov 13 '06 #8

100+
P: 173
in the 'Row source' ive got the following SELECT [tab_main].[username] FROM tab_main;

is there sumat wrong with that?
Nov 13 '06 #9

MMcCarthy
Expert Mod 10K+
P: 14,534
in the 'Row source' ive got the following SELECT [tab_main].[username] FROM tab_main;

is there sumat wrong with that?
Did you copy this line in exactly as it is with the extra quotes. It shouldn't be giving you this error if it did.

DoCmd.OpenForm "formtest", , , "[username]='" & Me.Combo24 & "'", , acDialog
Nov 13 '06 #10

NeoPa
Expert Mod 15k+
P: 31,299
Not at all.
However this was not included in your previous post so MMcCarthy, would have had to request it again from you before she could help.
Nov 13 '06 #11

100+
P: 173
THANKYOU

ive got it working somehow, it took some time.....

thanks to every1 who replied to my post
Nov 13 '06 #12

Post your reply

Sign in to post your reply or Sign up for a free account.