Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

Combo box needs data input

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dbl - 12 Apr 2005 21:09 GMT
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 Oldfield - 12 Apr 2005 22:48 GMT
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
>
[quoted text clipped - 13 lines]
>
> Thanks Bob
dbl - 13 Apr 2005 18:12 GMT
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?
[quoted text clipped - 22 lines]
>>
>> Thanks Bob
Rob Oldfield - 13 Apr 2005 19:49 GMT
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,
>
[quoted text clipped - 33 lines]
> >>
> >> Thanks Bob
dbl - 13 Apr 2005 20:15 GMT
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
[quoted text clipped - 45 lines]
>>>>
>>>> Thanks Bob
Rob Oldfield - 13 Apr 2005 23:25 GMT
...and now that the form has changed from 'IncidentData' to 'Incident Data
Entry', is that what the form is actually called?

> Hello Rob,
>
[quoted text clipped - 51 lines]
> >>>>
> >>>> Thanks Bob
dbl - 14 Apr 2005 08:31 GMT
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?
[quoted text clipped - 54 lines]
>> >>>>
>> >>>> Thanks Bob
Rob Oldfield - 14 Apr 2005 23:54 GMT
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?

> Yes sorry Rob what see is now correct and I have double checked it.
>
[quoted text clipped - 57 lines]
> >> >>>>
> >> >>>> Thanks Bob
dbl - 15 Apr 2005 12:26 GMT
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

> If you just add a temporary button onto the form and add this into its
> click
[quoted text clipped - 70 lines]
>> >> >>>>
>> >> >>>> Thanks Bob
Rob Oldfield - 15 Apr 2005 19:23 GMT
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?

> Rob it displays the Policy Number in a message box twice.
>
[quoted text clipped - 85 lines]
> >> >> >>>>
> >> >> >>>> Thanks Bob
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.