However the recordset is re-opened upon clicking the save button, so this surely should flag remove the file from the recordset? Join & Ask a Question Need Help in Real-Time? For arguements sake lets say this field is vStudentID and that this field will take either the SSN# or an instutional generated number, and you are trying to add a record The important thing is that if var1 2 and 3 match then it has to display it as one record.I.e. weblink
The code for this is: Expand|Select|Wrap|Line Numbers PrivateSubcmdSave_Click() DimdbAsdao.Database DimrstAsdao.Recordset DimstrFileNameAsString Setdb=CurrentDb Setrst=db.OpenRecordset("ResultsScreenshots") 'Checkafilepathwasentered. Quote: plus a Yes (No Duplicates) index? If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.Would you like to participate? I am getting a runtime error 3022 as follows:Run-Time error 3022The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, find this
Khalid_Afridi View Public Profile Find More Posts by Khalid_Afridi
You may have to register before you can post: click the register link above to proceed. function not always returns a VALUE so former and latter typo has no meaning __________________ Best Regards, Khalid if this helped, please click the scales at the top right of this You may have to register before you can post: click the register link above to proceed. It already handles record manipulation in forms (quite well).
If you don't see the cause of your error then, in the "Data" section of the ribbon, click "PDF or XPS". If you don't want any records delete so that you end up with 'gaps' in your TaskNo, then you can add a booloean (Yes/No) field to your table. Why does multiple inheritance increase sizeof of the object despite no virtual functions? Vince BOFH Now, BOFH Past, Information on duplicates Feeling like a fly on the inside of a closed window (Thunk!) If I post a lot, it is because I am bored
the latter returns a VALUE (perhaps and only if the function is set to do so). __________________ Free tools, code and samples here: To view links or images in signatures your Post your question and get tips & solutions from a community of 418,683 IT Pros & Developers. Reply With Quote 07-22-08,10:58 #6 hunterw View Profile View Forum Posts Registered User Join Date Jun 2008 Posts 22 the runtime error i get is 2162 something screwy about findrecord, seems Why is the FBI making such a big deal out Hillary Clinton's private email server?
smarbuView Member Profile Jan 4 2006, 01:41 PM Post#5Posts: 8Joined: 2-December 05Alan: thanks for your WONDERFUL code and suggestions! Get 1:1 Help Now Advertise Here Enjoyed your answer? Quote: and are there any fields that have their Default Value properties set No. I didn't change anymore coding for it, aside from putting in the On Error Resume Next line, and yet when I checked it again, it worked. :S Heck I even logged
vbaInet View Public Profile Find More Posts by vbaInet « Previous Thread | Next Thread » Thread Tools Show Printable Version Email this Page Display Modes http://prcflow.com/visual-basic/visual-basic-6-runtime-error-70.html Then I will take that autonumber ID and append it to a string, other words if the autonumber is 100, my string will be "XY-0100" and so on. First Name Please enter a first name Last Name Please enter a last name Email We will never share this with anyone. Starting with a precise definition, along with clear business goals, is essential.
If your service ID comes from another table then you should simply use this table with an auto number and the "CreateMultiStopRecord" function should then insert something into this table and Posts: 26,373 Thanks: 0 Thanked 2,403 Times in 2,372 Posts Re: Run-time error 3022 with .AddNew Are there any other fields in the table and are there any fields that have I need to trap error 3022 and automatically navigate to the pre-existing record. check over here You would be better advised learning about how to do it with Access, rather than finding alternative approaches (that can work, but leave you forever going the complicated way around).
I just looked again and found that the foreign key field was also indexed but to allow duplicates. Very strange. boblarson View Public Profile Visit boblarson's homepage!
When I open my table I can only see one line. The video will also teach the user how to pass data to a function and have the function return data back for further processing. Autonumber is the only field that is indexed and set as required. Reply With Quote May 21st, 2003,08:27 AM #2 Ecniv View Profile View Forum Posts Visit Homepage Don't Panic!
True and this would depend on how it's been dimensioned. I'm certainly not averse to using VBA with forms and doing all sorts of clever things, just redoing what's already provided for you. CONTINUE READING Join & Write a Comment Already a member? this content It will hold the ID for the record that will be created as a result of the first record.
I plan to set its value with an update query at the very end of the procedure. In the Before Insert event of your form you can use code like this to ensure that your TaskNo is both sequential and unique Private Sub Form_BeforeInsert(Cancel As Integer) Me.txtTaskNo = Generally though you're better off setting the primary key of your tables to be an AutoNumber datatype which will get rid of your error. Moreover this ID should then be inserted in your current table only in the "Form_BeforeUpdate" event as this will be called immediately before the record will be saved.
Since I am not familiar with the package you mention I can only guess at what is going on, but here goes...It seems that there is a field somewhere that must Quote: Originally Posted by vbaInet Can you post a stripped down version your db so I can have a quick look. I presume they did this instead of making the datatype AutoNumber and/or to prevent a duplicate value from being entered into this field.During my stepping thru the code, I have let hahahahaha.
The ones you recommended were:ccess BibleAccess Developers handbook (part 1 and 2)SQL for Mere MortalsWould it be possible to get the Author's name, Publisher and/or the ISBN for these books?many thanks,scott