I have a spreadsheet that I am doing a TransferSpreadsheet function from within Access
DoCmd.TransferSpreadsheet acImport, 8, "NewData_tbl", In_File, True
but sometimes the top line of the spreadsheet is a blank line which causes a Run-time error '2391' Field 'NoName' doesn't exist in...
Thanks MajP.
I set the On load event for my form (Modify_frm) as:
Private Sub EditRecords_Click()
Dim PWD As String
PWD = InputBox("Please enter the sales Order Number that you wish to view...", "", Default, 100, 100)
DoCmd.OpenForm "Modify_frm", , , "SO_NO = " & PWD
End Sub
but I am not...
Thanks for the reply MajP...
Perhaps my logic is a little twisted here but I am using a query to create a table of only the items belonging to a specific
order that is selected by the user.
That table is used as a record source for a form used by the user to edit the items for that specific...
I have a table called TotalOrder_tbl which contains order information.
In my database the user can select a button to display order information on a form
called Order_frm. On the Open form event for this form, an input box is used to allow the user to enter
an order number and then a query...
Thanks Duane-
I want to change the hard coded number of "1492198995" with a value that is input from the user with the following variation of the code:
Dim PWD As String
Dim strSql As String
strSql = "Delete * From ViewOrderData_tbl"
CurrentDb.Execute strSql
PWD = InputBox("Please enter...
That was a good catch and thank you or catching that..
I changed this and now have:
strSql = "SELECT * INTO ViewOrderData_tbl FROM Total_NW_tbl WHERE SO_NO=1492198995"
Debug.Print strSql
CurrentDb.Execute strSql, dbFailOnError
but now I am getting a Run-Time error '3010' Table...
Thanks Duane- Same result with the debug.print and dbFailonError - Run-time error '3078'
(and nothing shows up in the immediate window.)
This is very strange as the error message indicates not finding a table or query and suggests
checking the spelling but the exact same SQL statement, when...
I am getting a Run-time error '3078' which states the Microsoft Access database engine cannot find input table or query when I attempt to execute the following code:
strSq1 = "SELECT * INTO ViewOrderData_tbl FROM Total_NW_tbl WHERE (((Total_NW_tbl.SO_NO)=1492198995))"
CurrentDb.Execute strSql...
Hi Andy
I just tried your code, and found that if "Test" is placed in Me.OldPWD then the Message Box= "Your OldPWD is 'test'"
and if if "TEST" is placed in Me.OldPWD then the Message Box= "Your OldPWD is 'test'"
I am looking for a way that can determine if each letter in a string matches the...
I have a question about Case sensitive string comparisons...
I have a form with a text box called OldPWD that I entered "Test" into and with the code below I am
comparing this to "test" and the result is 0 which indicates that they are equal.
If I enter "TEST" (all caps) into the OldPWD text...
Thank you MajP and Duane for your suggestions.
Turns out I messed up as the parts on the form that I wanted to requery were subforms...
so once I remembered that I have to handle them separately I simply put the following into the
close event of the form and all is well...
Thanks Duane-
That method would add a couple additional messages boxes and I am wondering if might it be cleaner for the user if I was to add the same code under my Discard button as I
have under my Get New Order button on the first form and then do a requery of the first form before closing...
I have a form in my database named 'OrderMenu_frm' that allows a user to match items from a sales order.
The data from the sales order is populated onto the OrderMenu_frm if the user clicks a "Get New Order" button
on this form.
The user then matches sales order items on this form that are...
I have a spreadsheet that contains sales order information that I would like to convert over to an access database
and I am looking for suggestions or any tutorials on how to best do this.
The fields on the spreadsheet include customer name, order number, date entered, system type, computer...
Thanks Andy
lngLastRow = 7 which is the first blank row after the contents in the spreadsheet where I want the append to start.
however, lngLastRow = lngLastRow + 1 = FALSE which is probably why it is failing.
UPDATE- My bad, the false is sown in the watch window for lngLastRow + 1 and there...
I am trying to reuse some previous code but it seems like I am missing something...
The following code dumps the contents of table CleanPC_tbl into a spreadsheet and
I would like this to be an append but the spreadsheet keeps getting over written.
What am I missing?
Thanks
Set objXL =...
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.