PDA

View Full Version : Solved: Need Help with form



nepotist
09-02-2008, 01:59 PM
Hi,
I am sure that this is a small issue to ask here but I am not able to figure out where I am going wrong.
I a table with fields:
ProjectName, Project Location,ConcurrencyID, Size, SizeUnits, Year, Number and many more fileds that are not relevant to my question

I want to create form with all the above fields.
so this is what I did I selected the table in the navigation pan and clicked create form. and I have all teh fileds in teh form of text boxes. So I removed the textbox with the project name and put a combobox as i need the user to select the query.
So I wrote a query (select projectname from projectlist) made this as a row source for the combox and it did list the project when i run it.

but I did not update the other fields.

I then wrote another query for table and criteria being the value of the combo box. and i even updated the row source but dam thing dosent work.

Any clue where I am going wrong........ any guidance..

I followed the above procedure with other table but the only difference is that the form had to be build on a query and I worked perfectly fine.
Here ALL THE FIELDS That I NEED ARE IN A SINGLE TABLE.

Thanks for reading my story and appreciate all ur suggestions

CreganTur
09-03-2008, 05:37 AM
One options is that you can move your combobox to a different form and use the combobox's selection to open a form that shows the fields you need. If you do this, then you would use the DoCmd.OpenForm method- just be sure to reference the value of the combobox in the WHERE CONDITION for the OpenForm method.

nepotist
09-03-2008, 08:27 AM
Thought of that but that would be a lengthy application like the user clicks a button to open a form and then selects a project and all the info opens in another form and then the calculations would be done from the information in that form
it is kind a pain.. Is there any other option

Imdabaum
09-03-2008, 02:54 PM
What's the query SQL?

Do you have an example that you could post with just that form with maybe dummy data so we can look at it? It would be helpful.

Also for future reference you can right click any control and click "Change to" to convert the control to a textbox, combobox, listbox, etc.

CreganTur
09-25-2008, 08:32 AM
Another option is you can use either the combobox's Change event or have a button next to it. When a change is made to the ComboBox's selection have the code run to change the Form's Record Source to the value of a SQL SELECT statement that uses a WHERE clause that cites the value of the combobox.

nepotist
09-25-2008, 08:37 AM
Thank you guys I will be uploading a small data base ..... very soon... Once I am done with the meeting in like an hour

nepotist
09-25-2008, 10:14 AM
Here I have attached my a sample of the access file. I am debugging the module caltotalreservedtrips using f8 and it gives me error that it is unable to find the subform or it does not exist.
Thank you for your help

Rename the .pdf to .rar and then extract it.
Sorry I dont have a .zip software.

Thank you

CreganTur
09-25-2008, 11:06 AM
Rename the .pdf to .rar and then extract it.

Sorry, but I don't feel comfortable doing that on a work computer.


Sorry I dont have a .zip software.

You can get 7-zip (http://www.7-zip.org/) for free... heck if you're running Windows XP you've got a free (if sucky) zip program with the OS.

nepotist
09-25-2008, 11:23 AM
I understand ..Here you go with zip

CreganTur
09-25-2008, 11:30 AM
Crap... you're using 2007 (.accdb format). I won't be able to look at this until I get home- we're still using 2003 where I work.

Give us a little time- someone else with 2007 might be able to help you sooner than I can.

nepotist
09-25-2008, 11:39 AM
:(
I hope i can figure it out myself.
I will wait

Thank you