adding or editing records using a form...please help!?!

juliewhite

Registered User.
Local time
Today, 15:14
Joined
Aug 30, 2004
Messages
10
I am trying to create a database for a legal department. we want to track the cases that pass through our office. my biggest problem so far is coming up with a solution to edit and or add a record. I am working through a from called Referral Information. In it I have a subform with the Case Number and Plaintiff and Defendent Social Security numbers. What I would like to do is when the user enters the plaintiff social security number the form Plaintiff Information is opened either to the existing information to update the records or to a new record. I thought I had it figured out once using the function openformwithinput, but when I tried to do the same function to the defendent social security number, I was given an error because it was referring back to the form Plaintiff Information. I didn't think this would be this difiicult. Help me, I don't know where to look or what to try anymore.

Once we have established a case with the courts, the plaintiff and defendent for that case never change, however, the case can go to court an indefinite number of times.
 
openformwithinput
- I don't know what you're talking about here.

To position a form to a specific record, add a combo to the form. Choose the option that says to find the current record and the wizard will do the rest. To sync the subforms, make sure that the master/child links are properly set.
 
Are you trying to make a search engine form? After typing what you're looking for have the information show up for edit or add more details?

Michael
 
openformwithinput is a function that I found that I thought would be helpful, however it seems to have its limitations.

I've tried the route using a combobox and onnotinlist event which I think could be helpful, but I unfortunately am not all that familiar with the code that I need and the code I was using did not allow for editing. I need the ability to add records and view existing data in my plaintiff and defendent information tables. I quess my question is what is the best way to go about this. I am stuck there and have been for some time.

Thank you for your input.
 
I'm not sure what type of form I want. I want to enter the Plaintiff SS# in the subform for each referral then I want to know whether or not that plaintiff already exists in the database, view the address and other fields in my Plaintiff Information table to see if the information such as address needs to be updated, and if the plaintiff does not exist, I want to have the user add the plaintiff, so that in the future when that case goes to court again, when the plaintiff ss# is entered, that record is then available for editing if the address changes.
 
Try to make a blank combo box(wizard) from your table. Add the field that you wish to store in combo box for searching record.

Paste the code below on on after update.

Me.RecordsetClone.Findfirst "[field name] = '" & Me![combo box name] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark


If you can't get it to work than attached your database, so I can take a look at it.

hth,

Michael
 

Users who are viewing this thread

Back
Top Bottom