|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with finding records
Hi, I'm having a problem with code for an MS 2000 database. I've created a work order database. The main entry form is named "Work Order Entry". I placed a button on this form which opens another form named "Date Search form" which contains a calendar control and a subform named "sfrmBdetails".
On this form the user clicks a date on the calendar control, and the subform shows multiple records created on that date by using a query named "Date". One of the listed fields is "WO #". The problem is this... How can the user click on the work order number listed in the subform, and have the main form "work order entry" open to that corresponding record to edit? This is probably an easy one for you, but for me..... thnx much, dretzka |
|
#2
|
|||
|
|||
|
Just add code to the form where you capture the selection that opens a form using the code:
DoCmd.Openform formname:="frmWorkOrder", wherecondition:= "WordOrderID = " & Me.txtWorkOrderID Later, Murdock |
|
#3
|
|||
|
|||
|
Thanks for the code. The "Work Order Entry" form opens when you click the subform ID field, but dosent go to the matching record. It opens at the first one in the database. What am I doing wrong?
|
|
#4
|
|||
|
|||
|
Well, you should have a text box that isn't visible that you can copy the workorderID to and use that in the argument to pass to the form. It could be that the text box that is currently holding it is being cleared before you call that code and its losing its information.
Later, David Somers |
|
#5
|
|||
|
|||
|
Hi David, thnx for the advice. I do like the idea of the textbox on the form. But still the same deal: when the Work Order Entry form pops up, it stays on the first record in the database. Any ideas?
|
|
#6
|
|||
|
|||
|
Post the db and let us take a look.
Later, David Somers |
|
#7
|
|||
|
|||
|
How do I do that? (This is my first time posting on any board)
|
|
#8
|
|||
|
|||
|
First thing is go use Compact and Repair to make the database as small as possible with what you have. The forums require the file be smaller than 102400 bytes (102kb). You can then use winzip to zip up the db and compress it even more. Just make sure the archive file size is smaller than what I mentioned. When you reply there is an option at the bottom to attach a file. Click browse and find it and select it. Then when you hit submit it is uploaded to the forum.
Later, David Somers |
|
#9
|
|||
|
|||
|
Thanks so much for your efforts. I've zipped and compressed as much as I could.
To help you navigate the database, here goes. The opening form should be "Work Order Entry". Click the button on the right-hand side named "View WO's by date assigned". Chose date January 15, 2003. Type "Cameron" as your location, and the "Check" box for listing completed work orders. The query result shows on the subform. Our users need to click on the subform "WO#" field and have that record pop up in the "Work Order Entry" form for editing. Thnx, ross |
|
#10
|
|||
|
|||
|
The db isn't attached. Make sure you attach the file using the browse button of the reply form where it has Attach File in bold.
Later, David Somers |
|
#11
|
|||
|
|||
|
I think the problem is that the file is too large (1,243kb). I compacted, repaired, and zipped. I also deleted forms, queries and reports that were not neccesary. Any other way I could get it to you?
|
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Help with finding records |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|