Thanks for replying... you are correct it does auto fill the autonumber field upon .update.
I misread the error message, it was refering to a linked table where the parent needed a value prior to creating the child.
Sorry.
When useing tbl.addnew / tbl.update and you have an autonumber field, how do you give it a value?
For example tbl is the table and it has three fields (fldA, fldB, fldC) FldA is an autonumber field. The code looks like:
tbl.addnew
tbl!fldB = Forms!frmX!txtX
tbl!fldC = Forms!frmY!txtY...
Hi All,
Strange (MS Access 2003)~ In any .mdb that I try to update links via the linked table manager, I first get a blank listing instead of a list of all the linked tables. If I choose "select all" I will be prompted for each of the tables and it appears to be working. Then when all tables...
If I understand correctly... in my "Login" form...
Option Compare Database
Option Explicit
Public iUser As String
If this is correct, it didn't work. As soon as I close the Login form the value is lost.
I'd put it in a temp table but multiple users are logged in at the same time and then...
Hi,
I have a MS Access 2003 app where in a Login form OnOpen I run a module which defines a public variable. The variable simply holds the user who has just logged into the database.
OnOpen of Login form:
DoCmd.OpenModule "GlobalVar"
GlobalVar Module
Public iUser as String
When I run the...
I have a MS Access 2000 database set up with a SQL data source. I have a form that allows you to add a record and that works fine. Although, if the user moves off the record or even the form and then back to that record to edit or delete it. They receive a lock error.
"The record has been...
I'm going through a bit of a learning curve on my first MS Access 2003 app with SQL 2000 data source.
I've worked my way through various index requirements, but now I'm opening the data in VBA via a OpenRecordset.
I found the .Index and .Seek will not work with a OpenRecordset type...
I'm getting an error on the .UPDATE stating
Run time error '3146'
ODBC call failed
Here is my code and any suggestions would be great.
Dim rst As Recordset
Dim key1, key2, key3, key4 As String
Dim insertMonth As Date
nInsert = 1
insertMonth = comboInsMonth.Value
Set rst =...
I'm in the middle of a data conversion and I'm having a problem. My FindFirst isn't finding the first record.
My code:
coPolicy.FindFirst "CompanyName Like ' " & Left(CLNTMSTR![Name], 13) & "*'"
My Data:
The CoPolicy table has multiple records with exactly the same Company name, but my find...
Hmmm. I tried your code change and I still get the same error. I'm not quite sure what you mean regarding AllForms. I'm testing if a form is open from a form....
Am I just missing something?
I have a form that when a user wants to add to the subform they press a button which opens a an "add" form to enter the new data. When the user is done and is closing the "add" form, I want to check if I need to requery the subform...but I'm gettiing an error.
Here is the code for the "Add"...
Hi All,
I have a client's database who used MS Word to store text notes instead of a memo field in a table. The Word documents contain only text notes with dates. The Word document file name corresponds to the MS Access clients table IDNUM field.
I now have made a new table of IDNUM, DATE...
Hi All,
Just wondering if anyone can see anything wrong with my code... trying to get prior entered data to fill the form when press F7 or F8. If I press Escape it runs the Form_keypress, but F7 and F8 doesn't.
I do have the form keypreview set to True.
Thanks!
Private Sub...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.