"Enter parameter value" problem (1 Viewer)

xWouterx

New member
Local time
Today, 03:59
Joined
Aug 14, 2007
Messages
7
Hi all,

I'm working on an access application for my vacation job, I have never really worked in access before except creating a simple database for a vb.net project in school. Before I start explaining my problem I want to tell you that I tried looking for similar posts but haven't found the solution in any of those

Ok so here it goes...

I have a form which shows all data from 1 record at a time from a table called OpenPositions. On this form I have a list (List control) which shows data from the table PositionCandidates. Basicly it shows all candidates who applied for that position on the form (The data is linked with PK <-> FK as it should be)
Now, when I open my form it shows an open position and in the list it shows all candidates who have applied for that position. But sometimes (mostly after sorting various fields, and removing the sort) when I want to navigate to the next, previous, first or last record I get this prompt window which asks me to Enter a parameter value. When I close the form and re-open it, it still asks me for the parameter value. The only way I can get rid of it, is to go to 1 of the controls properties (doesn't matter which one) and close the properties window and then re-open the form again.

Has anyone ever experienced something like this and does anyone know how I can solve this problem.:eek:

Kind regards

Wouter
 
Last edited:

Tim L

Registered User.
Local time
Today, 02:59
Joined
Sep 6, 2002
Messages
414
Very weird. Any chance of posting the db? (Remove/alter sensitive data (ensure that the db is otherwise 'normal', sometimes removing certain data can change the way it works), Compact and Repair and then Zip it up.)

Tim
 

xWouterx

New member
Local time
Today, 03:59
Joined
Aug 14, 2007
Messages
7
Hello

You can download the database from the attachment.
I removed all data from the database, entered some random data to get the same result as before.

When you open the form press the top button called "Open positions".
There are 2 records in that table so you can browse to the first and the second.
So go to the second record (which has 3 candidates), right click in some text boxes and sort them a few times, then right click on the form to remove the filter/sort.
Now press the first or previous navigation button, the prompt should pop up.

This is what happens all the time, and it's something I really want to see removed because that's the only thing that's unwanted at this moment.

Edit:
I think I found the cause for this thing to pop up all the time. In my list I have this query:
Code:
SELECT [PositionCandidate].[NameCandidate] AS [Candidate Name],
       [PositionCandidate].[TypeCandidate] AS Type,
       [PositionCandidate].[FirstInterview] AS [First Interview], 
       [PositionCandidate].[SecondInterview] AS [Second Interview], 
       [PositionCandidate].[Status] AS Status 
FROM PositionCandidate 
WHERE [PositionCandidate].[OPosNr]=[OpenPosition].[OPosNr];
When I left out the query it showed every candidate in the list, but it didn't show the prompt after sorting etc. When I enter the query again and sort, it asks for the [OpenPosition].[OPosNr] value. because it's looking in the db for the OPosNr... But it should look at the OPosNr from my form (textbox)

Edit 2:
I think I have finally found the solution, the queury should be like this:
Code:
SELECT [PositionCandidate].[NameCandidate] AS [Candidate Name],
       [PositionCandidate].[TypeCandidate] AS Type,
       [PositionCandidate].[FirstInterview] AS [First Interview], 
       [PositionCandidate].[SecondInterview] AS [Second Interview], 
       [PositionCandidate].[Status] AS Status 
FROM PositionCandidate 
WHERE [PositionCandidate].[OPosNr]= [Forms]![Open Positions]![OPosNr];
Since it needed to refer to the textbox "OPosNr" on my form "Open Positions"
I guess I was refering to my db table. Now the prompt doesn't show up anymore... thank god :D


Kind regards

Wouter
 

Attachments

  • HROperations.zip
    321.2 KB · Views: 163
Last edited:

Users who are viewing this thread

Top Bottom