Combo box needs data input

  • Thread starter Thread starter dbl
  • Start date Start date
D

dbl

Hi I have a Combo box on my form IncidentData which is linked to a qryEmployerPolicy

I have entered the following in the query criteria Policy Number field

[Forms]![IncidentData]![PolicyNo] ( I hope that makes sense so far)

When you click on the Combo box a input box appears if you enter the policy
number from the field PolicyNo on the form you get the result I am looking
for.

What I am trying to do is get Access to look up the data in the query when
I click on the Combo box without me having to enter the policy number in
the input box each time.

Is this possible? If so how do I go about it?

Thanks Bob
 
What does the prompt on the input box say? What's the SQL of the row source
of the combo?
 
Hello Rob,

The promt on the input box says IncidentData!Policy Number

And the SQL row says

SELECT [qryEmployerPolicy].[Employer], [qryEmployerPolicy].[EmPolicyNo] FROM
[qryEmployerPolicy] ORDER BY [Employer];

Bob
What does the prompt on the input box say? What's the SQL of the row
source of the combo?

dbl said:
Hi I have a Combo box on my form IncidentData which is linked to a
qryEmployerPolicy

I have entered the following in the query criteria Policy Number
field

[Forms]![IncidentData]![PolicyNo] ( I hope that makes sense so far)

When you click on the Combo box a input box appears if you enter the
policy

number from the field PolicyNo on the form you get the result I am
looking for.

What I am trying to do is get Access to look up the data in the query
when I click on the Combo box without me having to enter the policy
number in the input box each time.

Is this possible? If so how do I go about it?

Thanks Bob
 
According to what you've posted so far... the criteria says
[Forms]![IncidentData]![PolicyNo] while the prompt is asking for Policy
Number.

Are you sure you have the spelling and spacing the same?


dbl said:
Hello Rob,

The promt on the input box says IncidentData!Policy Number

And the SQL row says

SELECT [qryEmployerPolicy].[Employer], [qryEmployerPolicy].[EmPolicyNo] FROM
[qryEmployerPolicy] ORDER BY [Employer];

Bob
What does the prompt on the input box say? What's the SQL of the row
source of the combo?

dbl said:
Hi I have a Combo box on my form IncidentData which is linked to a
qryEmployerPolicy

I have entered the following in the query criteria Policy Number
field

[Forms]![IncidentData]![PolicyNo] ( I hope that makes sense so far)

When you click on the Combo box a input box appears if you enter the
policy

number from the field PolicyNo on the form you get the result I am
looking for.

What I am trying to do is get Access to look up the data in the query
when I click on the Combo box without me having to enter the policy
number in the input box each time.

Is this possible? If so how do I go about it?

Thanks Bob
 
Hello Rob,

[Forms]![Incident Data Entry]![Policy Number]

This is copied from the query, sorry I posted it wrong.
According to what you've posted so far... the criteria says
[Forms]![IncidentData]![PolicyNo] while the prompt is asking for
Policy Number.

Are you sure you have the spelling and spacing the same?

dbl said:
Hello Rob,

The promt on the input box says IncidentData!Policy Number

And the SQL row says

SELECT [qryEmployerPolicy].[Employer],
[qryEmployerPolicy].[EmPolicyNo]
FROM

[qryEmployerPolicy] ORDER BY [Employer];

Bob
What does the prompt on the input box say? What's the SQL of the
row source of the combo?

Hi I have a Combo box on my form IncidentData which is linked to a

qryEmployerPolicy

I have entered the following in the query criteria Policy Number
field

[Forms]![IncidentData]![PolicyNo] ( I hope that makes sense so
far)

When you click on the Combo box a input box appears if you enter
the

policy

number from the field PolicyNo on the form you get the result I am
looking for.

What I am trying to do is get Access to look up the data in the
query when I click on the Combo box without me having to enter the
policy number in the input box each time.

Is this possible? If so how do I go about it?

Thanks Bob
 
....and now that the form has changed from 'IncidentData' to 'Incident Data
Entry', is that what the form is actually called?


dbl said:
Hello Rob,

[Forms]![Incident Data Entry]![Policy Number]

This is copied from the query, sorry I posted it wrong.
According to what you've posted so far... the criteria says
[Forms]![IncidentData]![PolicyNo] while the prompt is asking for
Policy Number.

Are you sure you have the spelling and spacing the same?

dbl said:
Hello Rob,

The promt on the input box says IncidentData!Policy Number

And the SQL row says

SELECT [qryEmployerPolicy].[Employer],
[qryEmployerPolicy].[EmPolicyNo]
FROM

[qryEmployerPolicy] ORDER BY [Employer];

Bob

What does the prompt on the input box say? What's the SQL of the
row source of the combo?

Hi I have a Combo box on my form IncidentData which is linked to a

qryEmployerPolicy

I have entered the following in the query criteria Policy Number
field

[Forms]![IncidentData]![PolicyNo] ( I hope that makes sense so
far)

When you click on the Combo box a input box appears if you enter
the

policy

number from the field PolicyNo on the form you get the result I am
looking for.

What I am trying to do is get Access to look up the data in the
query when I click on the Combo box without me having to enter the
policy number in the input box each time.

Is this possible? If so how do I go about it?

Thanks Bob
 
Yes sorry Rob what see is now correct and I have double checked it.

Bob
Rob Oldfield said:
...and now that the form has changed from 'IncidentData' to 'Incident Data
Entry', is that what the form is actually called?


dbl said:
Hello Rob,

[Forms]![Incident Data Entry]![Policy Number]

This is copied from the query, sorry I posted it wrong.
According to what you've posted so far... the criteria says
[Forms]![IncidentData]![PolicyNo] while the prompt is asking for
Policy Number.

Are you sure you have the spelling and spacing the same?

Hello Rob,

The promt on the input box says IncidentData!Policy Number

And the SQL row says

SELECT [qryEmployerPolicy].[Employer],
[qryEmployerPolicy].[EmPolicyNo]

FROM

[qryEmployerPolicy] ORDER BY [Employer];

Bob

What does the prompt on the input box say? What's the SQL of the
row source of the combo?

Hi I have a Combo box on my form IncidentData which is linked to a

qryEmployerPolicy

I have entered the following in the query criteria Policy Number
field

[Forms]![IncidentData]![PolicyNo] ( I hope that makes sense so
far)

When you click on the Combo box a input box appears if you enter
the

policy

number from the field PolicyNo on the form you get the result I am
looking for.

What I am trying to do is get Access to look up the data in the
query when I click on the Combo box without me having to enter the
policy number in the input box each time.

Is this possible? If so how do I go about it?

Thanks Bob
 
If you just add a temporary button onto the form and add this into its click
code...

msgbox [Forms]![Incident Data Entry]![Policy Number]
msgbox me.[Policy Number]

....then what happens?


dbl said:
Yes sorry Rob what see is now correct and I have double checked it.

Bob
Rob Oldfield said:
...and now that the form has changed from 'IncidentData' to 'Incident Data
Entry', is that what the form is actually called?


dbl said:
Hello Rob,

[Forms]![Incident Data Entry]![Policy Number]

This is copied from the query, sorry I posted it wrong.

According to what you've posted so far... the criteria says
[Forms]![IncidentData]![PolicyNo] while the prompt is asking for
Policy Number.

Are you sure you have the spelling and spacing the same?

Hello Rob,

The promt on the input box says IncidentData!Policy Number

And the SQL row says

SELECT [qryEmployerPolicy].[Employer],
[qryEmployerPolicy].[EmPolicyNo]

FROM

[qryEmployerPolicy] ORDER BY [Employer];

Bob

What does the prompt on the input box say? What's the SQL of the
row source of the combo?

Hi I have a Combo box on my form IncidentData which is linked to a

qryEmployerPolicy

I have entered the following in the query criteria Policy Number
field

[Forms]![IncidentData]![PolicyNo] ( I hope that makes sense so
far)

When you click on the Combo box a input box appears if you enter
the

policy

number from the field PolicyNo on the form you get the result I am
looking for.

What I am trying to do is get Access to look up the data in the
query when I click on the Combo box without me having to enter the
policy number in the input box each time.

Is this possible? If so how do I go about it?

Thanks Bob
 
Rob it displays the Policy Number in a message box twice.

I take it from your replies it should have worked so I did the following:

I have tried the same combo box on a second copy of my db this does work but
not fully. So I have deleted the combo box and the query and started again
it now works but only on the record that is displayed when the form Incident
Data Entry opens if you scroll to any other records and click on the combo
box it doesn't refresh it displays the wrong info (the info from the first
record), is there a way of over coming this?

Thanks for your help

Bob

Rob Oldfield said:
If you just add a temporary button onto the form and add this into its
click
code...

msgbox [Forms]![Incident Data Entry]![Policy Number]
msgbox me.[Policy Number]

...then what happens?


dbl said:
Yes sorry Rob what see is now correct and I have double checked it.

Bob
Rob Oldfield said:
...and now that the form has changed from 'IncidentData' to 'Incident Data
Entry', is that what the form is actually called?


Hello Rob,

[Forms]![Incident Data Entry]![Policy Number]

This is copied from the query, sorry I posted it wrong.

According to what you've posted so far... the criteria says
[Forms]![IncidentData]![PolicyNo] while the prompt is asking for
Policy Number.

Are you sure you have the spelling and spacing the same?

Hello Rob,

The promt on the input box says IncidentData!Policy Number

And the SQL row says

SELECT [qryEmployerPolicy].[Employer],
[qryEmployerPolicy].[EmPolicyNo]

FROM

[qryEmployerPolicy] ORDER BY [Employer];

Bob

What does the prompt on the input box say? What's the SQL of the
row source of the combo?

Hi I have a Combo box on my form IncidentData which is linked to
a

qryEmployerPolicy

I have entered the following in the query criteria Policy Number
field

[Forms]![IncidentData]![PolicyNo] ( I hope that makes sense so
far)

When you click on the Combo box a input box appears if you enter
the

policy

number from the field PolicyNo on the form you get the result I
am
looking for.

What I am trying to do is get Access to look up the data in the
query when I click on the Combo box without me having to enter
the
policy number in the input box each time.

Is this possible? If so how do I go about it?

Thanks Bob
 
Hmm. Maybe I'm coming at this from the wrong angle. What's the code that
you're running when you use the combo box? What even is it attached to?


dbl said:
Rob it displays the Policy Number in a message box twice.

I take it from your replies it should have worked so I did the following:

I have tried the same combo box on a second copy of my db this does work but
not fully. So I have deleted the combo box and the query and started again
it now works but only on the record that is displayed when the form Incident
Data Entry opens if you scroll to any other records and click on the combo
box it doesn't refresh it displays the wrong info (the info from the first
record), is there a way of over coming this?

Thanks for your help

Bob

Rob Oldfield said:
If you just add a temporary button onto the form and add this into its
click
code...

msgbox [Forms]![Incident Data Entry]![Policy Number]
msgbox me.[Policy Number]

...then what happens?


dbl said:
Yes sorry Rob what see is now correct and I have double checked it.

Bob
...and now that the form has changed from 'IncidentData' to 'Incident Data
Entry', is that what the form is actually called?


Hello Rob,

[Forms]![Incident Data Entry]![Policy Number]

This is copied from the query, sorry I posted it wrong.

According to what you've posted so far... the criteria says
[Forms]![IncidentData]![PolicyNo] while the prompt is asking for
Policy Number.

Are you sure you have the spelling and spacing the same?

Hello Rob,

The promt on the input box says IncidentData!Policy Number

And the SQL row says

SELECT [qryEmployerPolicy].[Employer],
[qryEmployerPolicy].[EmPolicyNo]

FROM

[qryEmployerPolicy] ORDER BY [Employer];

Bob

What does the prompt on the input box say? What's the SQL of the
row source of the combo?

Hi I have a Combo box on my form IncidentData which is linked to
a

qryEmployerPolicy

I have entered the following in the query criteria Policy Number
field

[Forms]![IncidentData]![PolicyNo] ( I hope that makes sense so
far)

When you click on the Combo box a input box appears if you enter
the

policy

number from the field PolicyNo on the form you get the result I
am
looking for.

What I am trying to do is get Access to look up the data in the
query when I click on the Combo box without me having to enter
the
policy number in the input box each time.

Is this possible? If so how do I go about it?

Thanks Bob
 
Back
Top