User Profile
Collapse
-
the "goal" is to warn people when they are about to change records. I really do not want to use the only solution I have seen to disable the mouse scroll thru records for access 2003. i am looking for something else - just code - no extensions or "other files" required. The problem is when people scroll from one record to another. I dont care if they do - they just need to know that they are going to another record adn like... -
JonHuff started a topic prompt before moving to next record, if no dont move, if yes then save and movein Accessprompt before moving to next record, if no dont move, if yes then save and move
I want to prompt users before they are allowed to go to the next existing record, search for a record, or create a new record. I display the records on a form. The form just opens to the 1st record in the table. I want the prompt to ask "Do you want to go to another record?" If they answer yes then save the data for the record they are currently on and allow them to go to another record, either the next , new record, or search. IF... -
How to assign incrementing numbers for range and random sample that range?
looking for MS Access VBA code to do the following: I am trying to assign incrementing numbers ( ie - 1-10) to records in an existing table by date and pull a 10% random sample from that table based on the numbers assigned. Any help is appreciated. Existing Example Table:
number date person
45001 1/19/2011 Ray
21020 1/19/2011 Steve
49009 1/19/2011 Bob
72005 1/19/2011... -
insert into sql statement not working why?
here is my code - whats wrong?
error i get is #3075 - "syntax error - missing operator in query expression"Code:DoCmd.SetWarnings False sSQL = "INSERT INTO tbl_temp " & _ " ([WhoFrom]) VALUES ('" & x & "');" DoCmd.RunSQL (sSQL) DoCmd.SetWarnings True
i have
...Code:DIM sSQL as String DIM x as String
-
run time error # 3167 Record is Deleted - why?
Why am i getting this error and more importantly how do i fix it? Here is my code. It runs fine until I modify it and add a new field to be imported into the DB. I will show the original code that runs fine then the modifed code (with the new field to be pulled in) which is giving me the error. It breaks at this line of code
LoanNo = NewImportRS.Fie lds(1)
I only change 2 lines of code from the original to the new code:...Last edited by Frinavale; Nov 24 '10, 04:20 PM. Reason: Please post code in [code]...[/code] tags. Added code tags. -
thats it - thank you very much - if i were in belgium right now i'd buy you dinner - have a wonderful eveningLeave a comment:
-
i am sorry but i am not an excel vba programmer - im used to access vba - you said
"for i=1 to ubound(array)"
"if cells(x,2).valu e <> array(i) then"
what do i use for "ubound(arr ay)" and "array(i)"? - the more explicit you could be would help
i tried to Dim i as array - its not an option, so am I supposed to Dim i as Integer then what?Leave a comment:
-
How to loop through a column and highlight cells if not found in range
here is my code and what I am trying to do - I want to start at row 2 and for each value in column B see if that cell value exists in range B10000:B10100. If it does exist, then go to the next row and evaluate, if it doesnt exist then highlight that cell adn go to the next row and evaluate. do this until column B is empty. it is highlighting all rows, even those where the cell value is in that defined range. HELP and Thank you in advance
... -
JonHuff started a topic How to show a message box that displays name for each worksheet in the excel filein AccessHow to show a message box that displays name for each worksheet in the excel file
I want this Access VBA to show a message box for each worksheet in the excel file. The MsgBox should say the worksheets name. HELP.
...Code:Sub ShowWorkSheets() Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet Set xlApp = New Excel.Application Set xlBook = xlApp.Workbooks.Open("L:\DOC-ADM\Business Analyst\Apr 08, FD SLA 2.xls") -
MS Access Query - specify table i want to delete from
i am getting an error try to run query:
it says to specify table to delete from?Code:DELETE * FROM tblExceptions INNER JOIN tblTemp3 ON tblExceptions.ExceptionKey=tblTemp3.ExceptionKey WHERE (((tblExceptions.ExceptionLevel)=0));
-
JonHuff started a topic how to append the current record in a form to its source table before updating it?in Accesshow to append the current record in a form to its source table before updating it?
I have a form in which users can create new records or modify existing records. All records are stored in one table. I want to be able to keep track of all changes made to existing records as well as allow htem to enter new records. They can enter new records fine. I need to append the current record in the form before anything about that current record is changed. How do I do this? Right now all that happens is the record is updated - I have... -
reply
I figured it out. I was trying to execute the code while my form was open. The form is based off the table I was trying to write to (DUH !!!). I changed it to write to a new test table - it works fine now. Thanks for looking anyways.Leave a comment:
-
response
The question was "How do I INSERT INTO a table a variable value". My code is not working.
the code provided showed I was trying to INSERT INTO table "Master_Tab le" field "Edited_By" the value of the variable "Editor". I dont know how else to say it.Leave a comment:
-
How do I INSERT INTO a table a variable value
Here is my code. I am trying to INSERT INTO "Master_Tab le" field "Edited_By" the variable value of "Editor"
"Editor" is the User Name of the person logged onto that computer
Code
...Code:Option Compare Database Option Explicit Declare Function WNetGetUser Lib "mpr.dll" _ Alias "WNetGetUserA" (ByVal lpName As String, _
No activity results to display
Show More
Leave a comment: