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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Setting a combo box value



 
 
Thread Tools Display Modes
  #1  
Old February 10th, 2010, 04:51 PM posted to microsoft.public.access
GLT
external usenet poster
 
Posts: 154
Default Setting a combo box value

Hi,

I am opening a form with the docmd.openform, and once the form opens I would
like to set the value of a combo box on that form automatically, based on a
record that was slected (double clicked) on the previous form.

The code below works and will open the form with the combox box value
completed, but for some reason when any of the first 6 records on the
original form are double clicked, the second form will open and the combo box
will be blank.

I have put a msgbox in to check the Me!Server values and they are all fine.
I have also checked the combobox values to make sure they exists there too
amd they do. Can anyone advise what might be causing this?

Cheers,
GLT.



MsgBox Me!Server
DoCmd.OpenForm "frm01_WServices"
Forms.frm01_WServices.cmbServer.Value = Me!Server
  #2  
Old February 10th, 2010, 05:05 PM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Setting a combo box value

I'm not familiar enough with your situation to tell, so take this as merely
a question...

If you've already selected a record on a form, what does having a second
form open (with a preloaded combobox) allow you to do (that you
couldn't/don't already do on the first form)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi,

I am opening a form with the docmd.openform, and once the form opens I
would
like to set the value of a combo box on that form automatically, based on
a
record that was slected (double clicked) on the previous form.

The code below works and will open the form with the combox box value
completed, but for some reason when any of the first 6 records on the
original form are double clicked, the second form will open and the combo
box
will be blank.

I have put a msgbox in to check the Me!Server values and they are all
fine.
I have also checked the combobox values to make sure they exists there too
amd they do. Can anyone advise what might be causing this?

Cheers,
GLT.



MsgBox Me!Server
DoCmd.OpenForm "frm01_WServices"
Forms.frm01_WServices.cmbServer.Value = Me!Server



  #3  
Old February 10th, 2010, 08:06 PM posted to microsoft.public.access
GLT
external usenet poster
 
Posts: 154
Default Setting a combo box value

Hi Jeff,

Thanks for your reply - the 1st form contains a list of servers and errors
that occured on them.

Second form is a utility that you can open, select a server and it connects
to an individual server and extracts some info.

I am just trying to make a short cut, so that when you double click on a
particular record in the first form, the second form auto populates the
server field and executes the code to go to the server and fetch the info.

I do have a button on the first form that opens the second form, and on the
second form you can scroll through a list of servers, and in the combo box
and select your choice, and then click the update button. This works file,
but is tedious if you want to repeat thsi process for lots of servers....

It would be nice to have the double click feature to save mouse clicks and
scrolls

Cheers,
Geoff.

"Jeff Boyce" wrote:

I'm not familiar enough with your situation to tell, so take this as merely
a question...

If you've already selected a record on a form, what does having a second
form open (with a preloaded combobox) allow you to do (that you
couldn't/don't already do on the first form)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi,

I am opening a form with the docmd.openform, and once the form opens I
would
like to set the value of a combo box on that form automatically, based on
a
record that was slected (double clicked) on the previous form.

The code below works and will open the form with the combox box value
completed, but for some reason when any of the first 6 records on the
original form are double clicked, the second form will open and the combo
box
will be blank.

I have put a msgbox in to check the Me!Server values and they are all
fine.
I have also checked the combobox values to make sure they exists there too
amd they do. Can anyone advise what might be causing this?

Cheers,
GLT.



MsgBox Me!Server
DoCmd.OpenForm "frm01_WServices"
Forms.frm01_WServices.cmbServer.Value = Me!Server



.

  #4  
Old February 10th, 2010, 08:14 PM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Setting a combo box value

Geoff

So, your second form has code that goes to a selected server and fetches
information.

Again, why couldn't your first form do this? Can you add the code from
form2 to form1 and do this without benefit of form2?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.


"GLT" wrote in message
...
Hi Jeff,

Thanks for your reply - the 1st form contains a list of servers and errors
that occured on them.

Second form is a utility that you can open, select a server and it
connects
to an individual server and extracts some info.

I am just trying to make a short cut, so that when you double click on a
particular record in the first form, the second form auto populates the
server field and executes the code to go to the server and fetch the info.

I do have a button on the first form that opens the second form, and on
the
second form you can scroll through a list of servers, and in the combo box
and select your choice, and then click the update button. This works
file,
but is tedious if you want to repeat thsi process for lots of servers....

It would be nice to have the double click feature to save mouse clicks and
scrolls

Cheers,
Geoff.

"Jeff Boyce" wrote:

I'm not familiar enough with your situation to tell, so take this as
merely
a question...

If you've already selected a record on a form, what does having a second
form open (with a preloaded combobox) allow you to do (that you
couldn't/don't already do on the first form)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi,

I am opening a form with the docmd.openform, and once the form opens I
would
like to set the value of a combo box on that form automatically, based
on
a
record that was slected (double clicked) on the previous form.

The code below works and will open the form with the combox box value
completed, but for some reason when any of the first 6 records on the
original form are double clicked, the second form will open and the
combo
box
will be blank.

I have put a msgbox in to check the Me!Server values and they are all
fine.
I have also checked the combobox values to make sure they exists there
too
amd they do. Can anyone advise what might be causing this?

Cheers,
GLT.



MsgBox Me!Server
DoCmd.OpenForm "frm01_WServices"
Forms.frm01_WServices.cmbServer.Value = Me!Server



.



  #5  
Old February 10th, 2010, 08:16 PM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Setting a combo box value

.... and to follow up on your response, is there anything different about
"the first 6 records"?

The notion of order is not something Access tables have ... to get "the
first 6", your form must impose some kind of order. What is that?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi Jeff,

Thanks for your reply - the 1st form contains a list of servers and errors
that occured on them.

Second form is a utility that you can open, select a server and it
connects
to an individual server and extracts some info.

I am just trying to make a short cut, so that when you double click on a
particular record in the first form, the second form auto populates the
server field and executes the code to go to the server and fetch the info.

I do have a button on the first form that opens the second form, and on
the
second form you can scroll through a list of servers, and in the combo box
and select your choice, and then click the update button. This works
file,
but is tedious if you want to repeat thsi process for lots of servers....

It would be nice to have the double click feature to save mouse clicks and
scrolls

Cheers,
Geoff.

"Jeff Boyce" wrote:

I'm not familiar enough with your situation to tell, so take this as
merely
a question...

If you've already selected a record on a form, what does having a second
form open (with a preloaded combobox) allow you to do (that you
couldn't/don't already do on the first form)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi,

I am opening a form with the docmd.openform, and once the form opens I
would
like to set the value of a combo box on that form automatically, based
on
a
record that was slected (double clicked) on the previous form.

The code below works and will open the form with the combox box value
completed, but for some reason when any of the first 6 records on the
original form are double clicked, the second form will open and the
combo
box
will be blank.

I have put a msgbox in to check the Me!Server values and they are all
fine.
I have also checked the combobox values to make sure they exists there
too
amd they do. Can anyone advise what might be causing this?

Cheers,
GLT.



MsgBox Me!Server
DoCmd.OpenForm "frm01_WServices"
Forms.frm01_WServices.cmbServer.Value = Me!Server



.



  #6  
Old February 11th, 2010, 01:52 AM posted to microsoft.public.access
GLT
external usenet poster
 
Posts: 154
Default Setting a combo box value

Hi Jeff,

Thanks for your reply - your second last post, the first form is just a
datasheet showing a summary of Servers and errors. The second form is a more
complicated form with lots of details regarding any servers you pick in the
combo box.

I guess to compare with the Northwind BD, imagine if you had a list of oders
that were placed for a particular week in data sheet form, and when you
double clicked an order, it opened up another form that showed you the full
company details and lots of other info about that company. Of course you
could have a button on form 1 that opens form 2, and then select the company
via a combo box, but if the user had to check 50 of those records, and the
combo box has a lot of choices, then double clicking and setting the new
form to the record you double clicked would be much faster. Also, most of
the time there will be no need to open form 2, so to try and include all that
extra info in form - I can't see how it would work...

In my case, the only thing common between form1 and form2, is the server
names. Once you select a server name in form2, it goes out to that server,
collects information and then populates a table locally, so there is no
related records between the two forms. I already have the button which opens
form 2 and it all works OK, just be nice to have access select the record
from form 1 and process the server selected when form 2 opens up.

re second post: from what I can see, there is no difference between value
the (Forms.frm01_WServices.cmbServer.Value) and the (Me!Server) value, thats
why I put the message box there so I could see it (ie. any value that
me!server displays via a message box, also exists in the combo box on form
2)... ill check on how the form odering works, but I would of thought that if
you were setting the .value of a combo box, record ordering would not be
taken into account?

I appreciate your help...

Cheers,
Geoff.

"Jeff Boyce" wrote:

.... and to follow up on your response, is there anything different about
"the first 6 records"?

The notion of order is not something Access tables have ... to get "the
first 6", your form must impose some kind of order. What is that?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi Jeff,

Thanks for your reply - the 1st form contains a list of servers and errors
that occured on them.

Second form is a utility that you can open, select a server and it
connects
to an individual server and extracts some info.

I am just trying to make a short cut, so that when you double click on a
particular record in the first form, the second form auto populates the
server field and executes the code to go to the server and fetch the info.

I do have a button on the first form that opens the second form, and on
the
second form you can scroll through a list of servers, and in the combo box
and select your choice, and then click the update button. This works
file,
but is tedious if you want to repeat thsi process for lots of servers....

It would be nice to have the double click feature to save mouse clicks and
scrolls

Cheers,
Geoff.

"Jeff Boyce" wrote:

I'm not familiar enough with your situation to tell, so take this as
merely
a question...

If you've already selected a record on a form, what does having a second
form open (with a preloaded combobox) allow you to do (that you
couldn't/don't already do on the first form)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi,

I am opening a form with the docmd.openform, and once the form opens I
would
like to set the value of a combo box on that form automatically, based
on
a
record that was slected (double clicked) on the previous form.

The code below works and will open the form with the combox box value
completed, but for some reason when any of the first 6 records on the
original form are double clicked, the second form will open and the
combo
box
will be blank.

I have put a msgbox in to check the Me!Server values and they are all
fine.
I have also checked the combobox values to make sure they exists there
too
amd they do. Can anyone advise what might be causing this?

Cheers,
GLT.



MsgBox Me!Server
DoCmd.OpenForm "frm01_WServices"
Forms.frm01_WServices.cmbServer.Value = Me!Server


.



.

  #7  
Old February 11th, 2010, 03:02 PM posted to microsoft.public.access
GLT
external usenet poster
 
Posts: 154
Default Setting a combo box value

Ok I figured this one out...

When I created the Combo box, and selected get values from a table, I
selected the server field, but another field was selected as well (asset
no.). Most of the asset number fields had the same entry as the server
field, except a few. I have deleted the asset field and only have the combo
box linking back to the server field... now it works perfectly.

I only need to now get the form#2 to execute its update button from form #1...

"GLT" wrote:

Hi Jeff,

Thanks for your reply - your second last post, the first form is just a
datasheet showing a summary of Servers and errors. The second form is a more
complicated form with lots of details regarding any servers you pick in the
combo box.

I guess to compare with the Northwind BD, imagine if you had a list of oders
that were placed for a particular week in data sheet form, and when you
double clicked an order, it opened up another form that showed you the full
company details and lots of other info about that company. Of course you
could have a button on form 1 that opens form 2, and then select the company
via a combo box, but if the user had to check 50 of those records, and the
combo box has a lot of choices, then double clicking and setting the new
form to the record you double clicked would be much faster. Also, most of
the time there will be no need to open form 2, so to try and include all that
extra info in form - I can't see how it would work...

In my case, the only thing common between form1 and form2, is the server
names. Once you select a server name in form2, it goes out to that server,
collects information and then populates a table locally, so there is no
related records between the two forms. I already have the button which opens
form 2 and it all works OK, just be nice to have access select the record
from form 1 and process the server selected when form 2 opens up.

re second post: from what I can see, there is no difference between value
the (Forms.frm01_WServices.cmbServer.Value) and the (Me!Server) value, thats
why I put the message box there so I could see it (ie. any value that
me!server displays via a message box, also exists in the combo box on form
2)... ill check on how the form odering works, but I would of thought that if
you were setting the .value of a combo box, record ordering would not be
taken into account?

I appreciate your help...

Cheers,
Geoff.

"Jeff Boyce" wrote:

.... and to follow up on your response, is there anything different about
"the first 6 records"?

The notion of order is not something Access tables have ... to get "the
first 6", your form must impose some kind of order. What is that?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi Jeff,

Thanks for your reply - the 1st form contains a list of servers and errors
that occured on them.

Second form is a utility that you can open, select a server and it
connects
to an individual server and extracts some info.

I am just trying to make a short cut, so that when you double click on a
particular record in the first form, the second form auto populates the
server field and executes the code to go to the server and fetch the info.

I do have a button on the first form that opens the second form, and on
the
second form you can scroll through a list of servers, and in the combo box
and select your choice, and then click the update button. This works
file,
but is tedious if you want to repeat thsi process for lots of servers....

It would be nice to have the double click feature to save mouse clicks and
scrolls

Cheers,
Geoff.

"Jeff Boyce" wrote:

I'm not familiar enough with your situation to tell, so take this as
merely
a question...

If you've already selected a record on a form, what does having a second
form open (with a preloaded combobox) allow you to do (that you
couldn't/don't already do on the first form)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi,

I am opening a form with the docmd.openform, and once the form opens I
would
like to set the value of a combo box on that form automatically, based
on
a
record that was slected (double clicked) on the previous form.

The code below works and will open the form with the combox box value
completed, but for some reason when any of the first 6 records on the
original form are double clicked, the second form will open and the
combo
box
will be blank.

I have put a msgbox in to check the Me!Server values and they are all
fine.
I have also checked the combobox values to make sure they exists there
too
amd they do. Can anyone advise what might be causing this?

Cheers,
GLT.



MsgBox Me!Server
DoCmd.OpenForm "frm01_WServices"
Forms.frm01_WServices.cmbServer.Value = Me!Server


.



.

  #8  
Old February 11th, 2010, 04:20 PM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Setting a combo box value

Geoff

I suppose one approach (not pretty, but possible) would be to pass an
OpenArg value to form2 when you start at form1.

Your form2 could then:
1) test to see if it has a OpenArg value
2) ensure it has a value in the combobox
3) click its own button

Steps 2 & 3 would only fire if OpenArgs were properly valued.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Ok I figured this one out...

When I created the Combo box, and selected get values from a table, I
selected the server field, but another field was selected as well (asset
no.). Most of the asset number fields had the same entry as the server
field, except a few. I have deleted the asset field and only have the
combo
box linking back to the server field... now it works perfectly.

I only need to now get the form#2 to execute its update button from form
#1...

"GLT" wrote:

Hi Jeff,

Thanks for your reply - your second last post, the first form is just
a
datasheet showing a summary of Servers and errors. The second form is a
more
complicated form with lots of details regarding any servers you pick in
the
combo box.

I guess to compare with the Northwind BD, imagine if you had a list of
oders
that were placed for a particular week in data sheet form, and when you
double clicked an order, it opened up another form that showed you the
full
company details and lots of other info about that company. Of course you
could have a button on form 1 that opens form 2, and then select the
company
via a combo box, but if the user had to check 50 of those records, and
the
combo box has a lot of choices, then double clicking and setting the new
form to the record you double clicked would be much faster. Also, most
of
the time there will be no need to open form 2, so to try and include all
that
extra info in form - I can't see how it would work...

In my case, the only thing common between form1 and form2, is the server
names. Once you select a server name in form2, it goes out to that
server,
collects information and then populates a table locally, so there is no
related records between the two forms. I already have the button which
opens
form 2 and it all works OK, just be nice to have access select the record
from form 1 and process the server selected when form 2 opens up.

re second post: from what I can see, there is no difference between value
the (Forms.frm01_WServices.cmbServer.Value) and the (Me!Server) value,
thats
why I put the message box there so I could see it (ie. any value that
me!server displays via a message box, also exists in the combo box on
form
2)... ill check on how the form odering works, but I would of thought
that if
you were setting the .value of a combo box, record ordering would not be
taken into account?

I appreciate your help...

Cheers,
Geoff.

"Jeff Boyce" wrote:

.... and to follow up on your response, is there anything different
about
"the first 6 records"?

The notion of order is not something Access tables have ... to get "the
first 6", your form must impose some kind of order. What is that?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services
mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with
no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi Jeff,

Thanks for your reply - the 1st form contains a list of servers and
errors
that occured on them.

Second form is a utility that you can open, select a server and it
connects
to an individual server and extracts some info.

I am just trying to make a short cut, so that when you double click
on a
particular record in the first form, the second form auto populates
the
server field and executes the code to go to the server and fetch the
info.

I do have a button on the first form that opens the second form, and
on
the
second form you can scroll through a list of servers, and in the
combo box
and select your choice, and then click the update button. This works
file,
but is tedious if you want to repeat thsi process for lots of
servers....

It would be nice to have the double click feature to save mouse
clicks and
scrolls

Cheers,
Geoff.

"Jeff Boyce" wrote:

I'm not familiar enough with your situation to tell, so take this as
merely
a question...

If you've already selected a record on a form, what does having a
second
form open (with a preloaded combobox) allow you to do (that you
couldn't/don't already do on the first form)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services
mentioned
in this post. Mention and/or description of a product or service
herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is",
with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi,

I am opening a form with the docmd.openform, and once the form
opens I
would
like to set the value of a combo box on that form automatically,
based
on
a
record that was slected (double clicked) on the previous form.

The code below works and will open the form with the combox box
value
completed, but for some reason when any of the first 6 records on
the
original form are double clicked, the second form will open and
the
combo
box
will be blank.

I have put a msgbox in to check the Me!Server values and they are
all
fine.
I have also checked the combobox values to make sure they exists
there
too
amd they do. Can anyone advise what might be causing this?

Cheers,
GLT.



MsgBox Me!Server
DoCmd.OpenForm "frm01_WServices"
Forms.frm01_WServices.cmbServer.Value = Me!Server


.



.



  #9  
Old February 11th, 2010, 07:04 PM posted to microsoft.public.access
GLT
external usenet poster
 
Posts: 154
Default Setting a combo box value

Hi Jeff,

I changed the button on form #2's sub to public, and then performed this
command:

Forms!frm01_Services.cmdGetServicesData_Click

Works a treat (thanks for yours and Dirk's assistance with this)...

Cheers,
GLT.
"Jeff Boyce" wrote:

Geoff

I suppose one approach (not pretty, but possible) would be to pass an
OpenArg value to form2 when you start at form1.

Your form2 could then:
1) test to see if it has a OpenArg value
2) ensure it has a value in the combobox
3) click its own button

Steps 2 & 3 would only fire if OpenArgs were properly valued.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Ok I figured this one out...

When I created the Combo box, and selected get values from a table, I
selected the server field, but another field was selected as well (asset
no.). Most of the asset number fields had the same entry as the server
field, except a few. I have deleted the asset field and only have the
combo
box linking back to the server field... now it works perfectly.

I only need to now get the form#2 to execute its update button from form
#1...

"GLT" wrote:

Hi Jeff,

Thanks for your reply - your second last post, the first form is just
a
datasheet showing a summary of Servers and errors. The second form is a
more
complicated form with lots of details regarding any servers you pick in
the
combo box.

I guess to compare with the Northwind BD, imagine if you had a list of
oders
that were placed for a particular week in data sheet form, and when you
double clicked an order, it opened up another form that showed you the
full
company details and lots of other info about that company. Of course you
could have a button on form 1 that opens form 2, and then select the
company
via a combo box, but if the user had to check 50 of those records, and
the
combo box has a lot of choices, then double clicking and setting the new
form to the record you double clicked would be much faster. Also, most
of
the time there will be no need to open form 2, so to try and include all
that
extra info in form - I can't see how it would work...

In my case, the only thing common between form1 and form2, is the server
names. Once you select a server name in form2, it goes out to that
server,
collects information and then populates a table locally, so there is no
related records between the two forms. I already have the button which
opens
form 2 and it all works OK, just be nice to have access select the record
from form 1 and process the server selected when form 2 opens up.

re second post: from what I can see, there is no difference between value
the (Forms.frm01_WServices.cmbServer.Value) and the (Me!Server) value,
thats
why I put the message box there so I could see it (ie. any value that
me!server displays via a message box, also exists in the combo box on
form
2)... ill check on how the form odering works, but I would of thought
that if
you were setting the .value of a combo box, record ordering would not be
taken into account?

I appreciate your help...

Cheers,
Geoff.

"Jeff Boyce" wrote:

.... and to follow up on your response, is there anything different
about
"the first 6 records"?

The notion of order is not something Access tables have ... to get "the
first 6", your form must impose some kind of order. What is that?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services
mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with
no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi Jeff,

Thanks for your reply - the 1st form contains a list of servers and
errors
that occured on them.

Second form is a utility that you can open, select a server and it
connects
to an individual server and extracts some info.

I am just trying to make a short cut, so that when you double click
on a
particular record in the first form, the second form auto populates
the
server field and executes the code to go to the server and fetch the
info.

I do have a button on the first form that opens the second form, and
on
the
second form you can scroll through a list of servers, and in the
combo box
and select your choice, and then click the update button. This works
file,
but is tedious if you want to repeat thsi process for lots of
servers....

It would be nice to have the double click feature to save mouse
clicks and
scrolls

Cheers,
Geoff.

"Jeff Boyce" wrote:

I'm not familiar enough with your situation to tell, so take this as
merely
a question...

If you've already selected a record on a form, what does having a
second
form open (with a preloaded combobox) allow you to do (that you
couldn't/don't already do on the first form)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services
mentioned
in this post. Mention and/or description of a product or service
herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is",
with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"GLT" wrote in message
...
Hi,

I am opening a form with the docmd.openform, and once the form
opens I
would
like to set the value of a combo box on that form automatically,
based
on
a
record that was slected (double clicked) on the previous form.

The code below works and will open the form with the combox box
value
completed, but for some reason when any of the first 6 records on
the
original form are double clicked, the second form will open and
the
combo
box
will be blank.

I have put a msgbox in to check the Me!Server values and they are
all
fine.
I have also checked the combobox values to make sure they exists
there
too
amd they do. Can anyone advise what might be causing this?

Cheers,
GLT.



MsgBox Me!Server
DoCmd.OpenForm "frm01_WServices"
Forms.frm01_WServices.cmbServer.Value = Me!Server


.



.



.

 




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:55 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.