Enter Parameter Value on Unbound Field

Mercy_Killer101

Registered User.
Local time
Today, 20:55
Joined
Nov 26, 2013
Messages
10
Hey guys! So I ran into another problem with my database. I'm using Access 2013.

My scenario is: I have a Form to add Job Logs. This form has a cascading combo box with Clients filtering Projects. However, the Clients Combo Box is unbound, Projects is bound to the ClientProjects ID. I had to do this instead of have a key for both Clients and Projects in my Job Logs table due to the fact that Clients and Projects have a many-to-many relationship.

For Adding Job Logs this is fine.

My Problem: I have separate forms for viewing and editing Job Logs, and naturally, because Clients has no binding, every time I run these forms Access brings up the 'Enter Parameter Value' Message Box. I have tried a VB script to assign the Client ID based on the ClientProject ID value stored in the Projects combobox, on Form Load, however it still asks me to enter the Parameter Value and just writes the code in the combobox. Here's the Script:

Private Sub Form_Load()
Me.SelectClient = "SELECT Client ID, Client Name " & _
"FROM Client Projects Query " & _
"WHERE ClientProjectID = " & Me.SelectProject.Value
End Sub

Also, the Projects Combobox is also empty.
 
What is the parameter it is asking you for? You need to set the RowSource of the SelectClient combo box..
Code:
Me.SelectClient[COLOR=Red][B].RowSource[/B][/COLOR] = "SELECT.......
 
What is the parameter it is asking you for? You need to set the RowSource of the SelectClient combo box..
Code:
Me.SelectClient[COLOR=Red][B].RowSource[/B][/COLOR] = "SELECT.......

It is asking me for the [Forms]![Add Job Logs].[Selectclient] Parameter. And Isn't rowsource just going to filter my list of selection? It won't actually assign the value, which I need to do.

Also I don't know if this can be solved, seeing as the Projects Combobox(SelectProjects) is empty. I have no idea why this is happening if it's bound to a field in the record?
 
Okay I am a bit lost without my coffee and by the looks of it I am not getting any today ;), so can you explain with the names of Form's and combo boxes what you want to do?
 
Okay I am a bit lost without my coffee and by the looks of it I am not getting any today ;), so can you explain with the names of Form's and combo boxes what you want to do?

I'm in the same boat :p

Okay so I have 3 forms: Add Job Logs, Edit Job Logs, and View Job Logs.
The relevant Combo Boxes are the SelectClient, and SelectProject comboboxes.
SelectClient filters out SelectProject, i.e. cascading combo box.

Select Client is not bound, it is used only for filtering. SelectProject is Bound to my Foreign Key, ClientProject ID. This works as far as Add Job Logs is concerned. However it stops working in my View Job Logs and Edit Job Logs forms, i.e. When I open those forms Access brings up an Enter Parameter for the SelectClient value.

And I think it's a logic issue on my part. SelectProject depends on SelectClient for its rowsource. However, in View and Edit forms, I'm trying to assign SelectClient's value based on the value in SelectProject, which is empty.

My first problem will be populating SelectProject, without breaking the ability to filter it based on SelectClient, as I still require this functionality for the Edit form.

Any help is appreciated.
 
So your problem is that the ComboBox needs to be available for all Forms.. So why don't you set the RowSource of the First combo box on the Form Load of every Form instead of setting it in properties..
 
So your problem is that the ComboBox needs to be available for all Forms.. So why don't you set the RowSource of the First combo box on the Form Load of every Form instead of setting it in properties..

I'm not sure we're on the same page.

My problem is that SelectClient is empty in the View and Edit forms, when it needs to be populated with the Client ID one selects when Adding a job log(The Client ID for that specific job log). The reason this is happening is that SelectClient is not bound to a field, so there is nowhere to store this value, except in SelectProject, which is bound to ClientProject ID.

The kicker is that SelectProject gets its rowsource from SelectClient, so if SelectClient is empty, SelectProject is too, and if SelectProject is empty, I have no idea how to populate SelectClient in the Edit and View forms.

I hope I have explained it well enough, I can upload a copy of the database if it's simpler.

EDIT:I have it working for View Job Logs, because I don't need to edit that so filtering doesn't need to work.
 
Last edited:
I hope I have explained it well enough, I can upload a copy of the database if it's simpler.
Much simpler ! ;)

How to Upload a Stripped DB.

To create a Sample DB (to be uploaded for other users to examine); please follow the steps..

1. Create a backup of the file, before you proceed..
2. Delete all Forms/Queries/Reports that are not in Question (except the ones that are inter-related)
3. Delete auxiliary tables (that are hanging loose with no relationships).
4. If your table has 100,000 records, delete 99,990 records.
5. Replace the sensitive information like Telephone numbers/email with simple UPDATE queries.
6. Perform a 'Compact & Repair' it would have brought the Size down to measly KBs..
7. (If your Post count is less than 10 ZIP the file and) Upload it..

Finally, please include instructions of which Form/Query/Code we need to look at. The preferred Access version would be A2003-A2007 (.mdb files)
 
Much simpler ! ;)

How to Upload a Stripped DB.

To create a Sample DB (to be uploaded for other users to examine); please follow the steps..

1. Create a backup of the file, before you proceed..
2. Delete all Forms/Queries/Reports that are not in Question (except the ones that are inter-related)
3. Delete auxiliary tables (that are hanging loose with no relationships).
4. If your table has 100,000 records, delete 99,990 records.
5. Replace the sensitive information like Telephone numbers/email with simple UPDATE queries.
6. Perform a 'Compact & Repair' it would have brought the Size down to measly KBs..
7. (If your Post count is less than 10 ZIP the file and) Upload it..

Finally, please include instructions of which Form/Query/Code we need to look at. The preferred Access version would be A2003-A2007 (.mdb files)

Done. It's a split Database, btw. Like I said, Add Job Logs and View Job Logs should be fine, Edit Job Logs is the main problem.
 

Attachments

You missed a little bit of detail..
Finally, please include instructions of which Form/Query/Code we need to look at.
Also is there something like a Search Form? How will you open the appropriate Form for Editing/Adding?
 
You missed a little bit of detail..

Also is there something like a Search Form? How will you open the appropriate Form for Editing/Adding?

For editing it's basically each technician can only edit/delete his logs(Filtered based on Technician ID -> have a module to get the currently logged in user's name) and as long as they haven't been processed for billing yet i.e. price is Null. tl;dr no search form necessary for that.

I may add one for View Job logs but that will be at a later stage. ATM the database only has dummy data while I add/test functionality and root out bugs.
 

Users who are viewing this thread

Back
Top Bottom