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...
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...
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...
I'm updating some old code which had dates hard coded into the "WHERE" of an SQL statment.
Here is the original which works but isn't practical.
DoCmd.RunSQL ("INSERT INTO CommMatrix ( HICode, HealthInsurer, FormerName) SELECT v2_CommMatrixReport.HICode, v2_CommMatrixReport.HealthInsurer...
I'm not findig the function I need to convert a string to a date.
I have s="04/22/2005", but need it to be a date.
I know how to do it in VFP but my VBA mind isn't working today.
Thanks!
I'm trying to create a combo box that lists a series of dates, some before today and some after.
How do you set the row source of a combo box to be a series of functions?
For Example:
=DateAdd("m", 1, Date()); =DateAdd("m", 2, Date()); ...
I've tried setting the row source to value list and...
I'm looking for a lookup for month/year or a calendar object that will let users look to past months or future months. The data I need returned is only the month and year.
I don't want to use a standard lookup where maintenance would be required to update the date info as years pass.
Any...
Have Access database where I would like the user to login. Have the screen for the user to login.
What I need help on is setting the "global" variable so throught the project I know who is logged in. I created a Modudle called GlobalVar and all that is in it is:
Global iUser as Integer
I...
I'm trying to make a 4x6" postcard. I have created a custom paper size on my printer,which will let me set the width but not the height. So it is forcing me to 6X11". Now I'm getting two records to print on one piece of paper. Is there a way in Access to create the correct paper size?
Thanks!
I have a form with a save and cancel button.
My cancel button has...
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
DoCmd.Close , , acSaveNo
but if the user has not made any changes, VBA creates an error stating "UNDO is not available at this time".
Is there a way to run a...
I'm sure this will be obvious to most of you...
I have a form which I think I need three ADO Data controls. One for tblInvoices, tblReceipts and tblVoids.
On the screen the user enters a invoice number and the three grids are to then show any data they may have for that invoice number. The...
Visual FoxPro has an $ Operator that...
Returns true (.T.) if a character expression is contained in another character expression; otherwise, returns false (.F.).
Syntax
cSearchFor $ cSearchIn
I'm not finding anything in VBA that compares...
Any suggestions?
Thanks!
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.