Replace the RsCur with a DLookup...
strDBCura = "Update " & RsType!sobpdebit & " set DebitDBN = Debits * " & DLookup("CUR","CURRFG", "SOBP = '" & RsType!SOBP & "';"
I wrapped the criteria of the DLookup with single quotes, assuming it was a string, if it's a number, remove them...
First off, just to make sure we are on the same page, you know that:
Set RsType = CurrentDb.OpenRecordset("SELECT SOBP,
SOBPDEBIT
FROM RFGDebitNotes ;") produces a recordset, not a single answer, correct...
You cannot reference the recordset you just created in code in another SQL statement...it must be compiled into the DB for the SQL statement to recognize it. Using Nested SQL statments will get you where you want to go.
Let me try to save you some coding Barry: (no offense intended, Dennis)
in a function:
Dim charLoc as Integer
Dim extLoc as Integer
Dim a as String
a = "\\server\ehealth\StrayDogs\DogPics\2007\012345.jpg"
charLoc = (InStr(1, StrReverse(a), "\")) - 2
extLoc = (InStr(1...
Dim a As String
Dim strLeft As String
Dim strRight As String
Dim startPOS As Integer
Dim endPOS As Integer
a = "This is part one of the string <DIV style=""padding:5px; FLOAT: middle; MARGIN: 5px; WIDTH: 88; BACKGROUND-COLOR: #cccccc; height:8"">" & _
"<font...
Unfortunately, if you are going to enforce the referential integrity, this will happen unless you are willing to create new entries for each change or archive off historical data so that it is no longer part of the enforcement.
As I see it, you have two choices:
Create a new column which designates the Before/After status of the entry
If you are using an auto number sequence as a primary key, there will be two entries per student, the lesser number will be the before eval, the higher number will be the after.
modify the Input Mask for the text box instead: '#0/#0/00##' will only allow up to two numbers(leading zeroes not mandatory) followed by the slash, up to two numbers, slash, up to four numbers. To make the numbers mandatory, use '00/00/0000'
after being unable to find a suitable candidate for PM or come to an agreement, the UK will give up hope...
...the US, seizing upon the opportunity, will offer up GWB as a replacement :eek:
in your form:
Private Sub Combo0_Change()
Select Case Me.Combo0
Case 1
Do this...
DoCmd.OpenForm "myFormName"
DoCmd.OpenForm "myOtherFormName"
Case 2
DoCmd.OpenReport "thisReport",acViewPreview...
I believe the proper argument for the shell command is vbMaximizedFocus, but you'll get the options if you type a comma after your commandline.
after opening, you could also use SendKeys to pass the "F11" full-screen command as well
Your Criteria in the DCount function is comparing a String, therefore the criteria must be wrapped in quotes or DCount looks for a variable with the string name you passed:
DCount("[strModelNo]", "[tblAJL_Test]", "[strModelNo]='" & Me![txtModelNo] & "'")
I get this error between users. The local repository location, in my case, is within the user's My Documents folder, which exists in C:\Documents and Settings\USERNAME\My Documents ...the USERNAME portion must be assembled prior to relinking the tables on application startup.
Essentially the...