A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Advanced ComboBox



 
 
Thread Tools Display Modes
  #1  
Old July 22nd, 2009, 05:39 AM posted to microsoft.public.access.forms
MiHutch
external usenet poster
 
Posts: 1
Default Advanced ComboBox

Here is my setup; I have a form which is used for hardware inventory. In the
form I have a combo box which refers to a piece of hardware. The item values
in the combo box are desktop, laptop, cell phone and external hard drive.
Currently when I select an item then double click on the combo box it opens a
second form where I am adding additional information about the item. This
second combo box is not item specific, but a very general hardware form.

Is there a way to have several different forms based on the item in the combo
box? I would like to select laptop in the combo box, then when I double click
on the combo box the computer data entry form will open. If I select cell
phone I would like a cell phone data entry form will open.

Is this possible? I could recreate the forms to work, but this would work
great for me.

Thanks for any suggestions.
MiHutch

  #2  
Old July 22nd, 2009, 05:52 AM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Advanced ComboBox

MiHutch,

Yes, this is possible but wondering why you would want to do it this way.
That means IF you add anything to the combo box you need to create a new
form... to much work.

Inventory is inventory, so what you need is one table and one pop-up form
that the caption will change on based on the selection in the combo box.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"MiHutch" u53459@uwe wrote in message news:99700a3bb1250@uwe...
Here is my setup; I have a form which is used for hardware inventory. In
the
form I have a combo box which refers to a piece of hardware. The item
values
in the combo box are desktop, laptop, cell phone and external hard drive.
Currently when I select an item then double click on the combo box it
opens a
second form where I am adding additional information about the item. This
second combo box is not item specific, but a very general hardware form.

Is there a way to have several different forms based on the item in the
combo
box? I would like to select laptop in the combo box, then when I double
click
on the combo box the computer data entry form will open. If I select cell
phone I would like a cell phone data entry form will open.

Is this possible? I could recreate the forms to work, but this would work
great for me.

Thanks for any suggestions.
MiHutch



  #3  
Old July 22nd, 2009, 08:10 PM posted to microsoft.public.access.forms
MiHutch via AccessMonster.com
external usenet poster
 
Posts: 7
Default Advanced ComboBox

Gina, thanks for the response.

I like the single table setup, but is it a macro expression or will I have to
do some programming to get this function to work?

Thanks,
MiHutch

Gina Whipp wrote:

Yes, this is possible but wondering why you would want to do it this way.
That means IF you add anything to the combo box you need to create a new
form... to much work.

Inventory is inventory, so what you need is one table and one pop-up form
that the caption will change on based on the selection in the combo box.


--
Message posted via http://www.accessmonster.com

  #4  
Old July 22nd, 2009, 08:31 PM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Advanced ComboBox

MiHutch,

It will require a little programming BUT anyone here can help with that with
ease so don't panic. I imagine it could be done with a macro but I haven't
used them in years but I could probably figure that out.

An example of what would be need to open another form from a combo box in
the main form...

DoCmd.OpenForm "frmAssociatedCards", , , "[ppPropertyID]=" &
Me![cboAssociatedPropertyID]

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"MiHutch via AccessMonster.com" u53459@uwe wrote in message
news:9977a39b06e80@uwe...
Gina, thanks for the response.

I like the single table setup, but is it a macro expression or will I have
to
do some programming to get this function to work?

Thanks,
MiHutch

Gina Whipp wrote:

Yes, this is possible but wondering why you would want to do it this way.
That means IF you add anything to the combo box you need to create a new
form... to much work.

Inventory is inventory, so what you need is one table and one pop-up form
that the caption will change on based on the selection in the combo box.


--
Message posted via http://www.accessmonster.com



  #5  
Old July 22nd, 2009, 10:10 PM posted to microsoft.public.access.forms
MiHutch via AccessMonster.com
external usenet poster
 
Posts: 7
Default Advanced ComboBox

Ok, I am very weak in this area, but have been looking all over the internet
trying to learn it fast. I am looking at the code and don't see where it will
look up the inventory then open the correct form.

Here is my setup; I have a table called "Inventory" which contains records
for Inventory_ID which is an AutoNumber, Type (Combo Box, value list which I
will be changing to a table), Serial_# and CellPhone_#. I have two forms
designed to open based on what item is selected from the Type combo box. The
first form is Computer Inventory Form, this will show data for computers, i.e.
hard drive size, hard drive make. The second form is called CellPhone Form
which will show cell phone only data, i.e. phone number.

Right now the options are Laptop, Desktop, Cell Phone. If I double click on
the type box now the Computer Inventory Form opens correctly to the correct
record. I used a Marco expression to build this, maybe not the cleanest way
but it works.

What do I need to do to get it to open to a form based on the combo box type
selected? I am looking at the command below and missing where this takes
place.

I have tried to look around to find out how to make this work with no luck.
Where can I find out how to build the expression below? Is it a SQL
expression or a VB expression? I am trying to break it down section by
section with no luck.

Thanks for any help you can give.

MiHutch

Gina Whipp wrote:
..

DoCmd.OpenForm "frmAssociatedCards", , , "[ppPropertyID]=" &
Me![cboAssociatedPropertyID]


--
Message posted via http://www.accessmonster.com

  #6  
Old July 22nd, 2009, 10:40 PM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Advanced ComboBox

MiHutch,

Okay... I see why you are getting confused. The example I provided will
work if you use one form as I suggested. To get the form to open with the
way you want to do it would be differently... A Select Case would probably
be the best way. Without reading and trying to figure out what's what...

Select Case NameOfYourComboBox
Case "CellPhone"
DoCmd.OpenForm "YourFormNameHere"
Case
Keep going till all done
End Select

Place the above on double-click of your combo box. The above cannot be done
in a macro.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"MiHutch via AccessMonster.com" u53459@uwe wrote in message
news:9978b0f5ce6a8@uwe...
Ok, I am very weak in this area, but have been looking all over the
internet
trying to learn it fast. I am looking at the code and don't see where it
will
look up the inventory then open the correct form.

Here is my setup; I have a table called "Inventory" which contains records
for Inventory_ID which is an AutoNumber, Type (Combo Box, value list which
I
will be changing to a table), Serial_# and CellPhone_#. I have two forms
designed to open based on what item is selected from the Type combo box.
The
first form is Computer Inventory Form, this will show data for computers,
i.e.
hard drive size, hard drive make. The second form is called CellPhone Form
which will show cell phone only data, i.e. phone number.

Right now the options are Laptop, Desktop, Cell Phone. If I double click
on
the type box now the Computer Inventory Form opens correctly to the
correct
record. I used a Marco expression to build this, maybe not the cleanest
way
but it works.

What do I need to do to get it to open to a form based on the combo box
type
selected? I am looking at the command below and missing where this takes
place.

I have tried to look around to find out how to make this work with no
luck.
Where can I find out how to build the expression below? Is it a SQL
expression or a VB expression? I am trying to break it down section by
section with no luck.

Thanks for any help you can give.

MiHutch

Gina Whipp wrote:
.

DoCmd.OpenForm "frmAssociatedCards", , , "[ppPropertyID]=" &
Me![cboAssociatedPropertyID]


--
Message posted via http://www.accessmonster.com



  #7  
Old July 23rd, 2009, 03:19 AM posted to microsoft.public.access.forms
MiHutch via AccessMonster.com
external usenet poster
 
Posts: 7
Default Advanced ComboBox

That worked pretty well and is very clean. Is there a way to have it open to
a specific record I am double clicking? I had it setup so when double clicked
on the Type for let’s say record 10 it would open up the computer form for
record 10.

When I double click now it takes me the correct form based on what I set, but
always to record 1.

I really appreciate the help, it is looking good. I didn't think I was going
to be able to get this to work.

Thanks,
MiHutch


Gina Whipp wrote:

Select Case NameOfYourComboBox
Case "CellPhone"
DoCmd.OpenForm "YourFormNameHere"
Case
Keep going till all done
End Select


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1

  #8  
Old July 23rd, 2009, 03:24 AM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Advanced ComboBox

MiHutch,

Glad that part worked for you... Yes but do you have a seperate form or are
you trying to have the same form open to a specific record?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"MiHutch via AccessMonster.com" u53459@uwe wrote in message
news:997b63af97beb@uwe...
That worked pretty well and is very clean. Is there a way to have it open
to
a specific record I am double clicking? I had it setup so when double
clicked
on the Type for let's say record 10 it would open up the computer form for
record 10.

When I double click now it takes me the correct form based on what I set,
but
always to record 1.

I really appreciate the help, it is looking good. I didn't think I was
going
to be able to get this to work.

Thanks,
MiHutch


Gina Whipp wrote:

Select Case NameOfYourComboBox
Case "CellPhone"
DoCmd.OpenForm "YourFormNameHere"
Case
Keep going till all done
End Select


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1



  #9  
Old July 23rd, 2009, 04:48 AM posted to microsoft.public.access.forms
MiHutch via AccessMonster.com
external usenet poster
 
Posts: 7
Default Advanced ComboBox

The forms that I want it to open are separate, but the table that the data is
stored in from both forms are the same.

MiHutch

Gina Whipp wrote:
MiHutch,

Glad that part worked for you... Yes but do you have a seperate form or are
you trying to have the same form open to a specific record?

That worked pretty well and is very clean. Is there a way to have it open
to

[quoted text clipped - 20 lines]
Keep going till all done
End Select


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1

  #10  
Old July 23rd, 2009, 05:14 AM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Advanced ComboBox

MiHutch,

Okay then I need the name of the forms. ANother thought, you might get a
"Can't save record..." message because of write conflict. You will need to
add a Save command to the form that gets edited on to the Unload.

Here is an example (watch out for word wrap)... DoCmd.OpenForm
"NameOfFormYouWantToOpen", , , "[PKOnTheFormYouAreOpening]=" &
Me![ComboBoxOnFormYouAreOpeningFrom]

However, if this is a seperate function then you might want to attach the
above to a command button.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"MiHutch via AccessMonster.com" u53459@uwe wrote in message
news:997c29ccb86a3@uwe...
The forms that I want it to open are separate, but the table that the data
is
stored in from both forms are the same.

MiHutch

Gina Whipp wrote:
MiHutch,

Glad that part worked for you... Yes but do you have a seperate form or
are
you trying to have the same form open to a specific record?

That worked pretty well and is very clean. Is there a way to have it
open
to

[quoted text clipped - 20 lines]
Keep going till all done
End Select


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.