Hi NeoPa
Yes, in my experience since the days of office 97 to before ribbons were forced on us in 2007, Toolbars created in code don't seem to exist until the code creating them has run, which makes sense. Although toolbars so created will now appear on an Addin tab. I now define my own ribbons not toolbars, but the short cut menus still work as the y did pre-ribbons. It is inconvenient having to run the creating code before they...
User Profile
Collapse
-
Hi All
I have never used 365 so this may be irrelevant, but I suspect not.
Have you set the Shortcut Menu Bar property for the Form or Control in the properties Other Tab.
The code creating the shortcuts will need running ij the session before they appear inthe list for selection.
HTH
MTBLeave a comment:
-
Hi All
Long time since I posted here!
Not withstanding the previous replies, may I suggest this or similar may help
Code:If DCount("[field]", "Table", "[field] = " & Me.Txt_field) >= 1 Then 'found it Else 'didnt find it End If
Leave a comment:
-
Hi Jeremy
I assume that [Case Log ID] is a text field.
as [Forms]![Import_FRM]![CaseLogIDTXT] will be trated as a string literal in VBA and not recongnised as the for control value, replace this
Code:"WHERE ((([Outreach Data].[Case Log ID]) Like[Forms]![Import_FRM]![CaseLogIDTXT]));""
Code:"WHERE ((([Outreach
Leave a comment:
-
Hi
Not sure if this is relevant to your situation, but there is a setting in Options -> Advanced where you can set the default 'Behaviour entering field' to: Select entire field, Go to start of field or Go to end of field.
This is in A2007 (should be similar in later versions?).
HTH
MTB
ps: textbox (and others?) have .SelStart, .SelText and .SelLength properties...Leave a comment:
-
Hi
Not sure if this is a great help to you but but it sounded interesting, so the following is one method for abtaining the minutes in a given perionCode:Option Explicit Dim StartTime As Date Dim EndTime As Date Sub AssignTimeToPeriods() Dim i As Integer Dim ThisPeriodStart As Date Dim ThisPeriodEnd As Date Dim ThisPeriodTime As Single Dim ThisPeriodFieldName
Leave a comment:
-
Hi
Not sure what the problem you are having is, but I think thisCode:If Me.NewRecord Then 11. CreatedBy = Environ("Username") 12. End If
Does that help?
MTBLeave a comment:
-
Hi
I think we need to see what you have done to calculate the net profit so we have an idea what the error may be.
Generally it would be something likeCode:PctNetProfit:([Selling Price]-[Cost])/[Cost]*100
HTH
MTBLeave a comment:
-
Hi
I would hazard a guess that you need to put this statementCode:TempVars("UserName").Value = Me.txtUsername.Value
MTBLeave a comment:
-
Hi NeoPa
I am just curious as to why you suggest the Replace() function in stead of just concatenating the variable in the stringCode:strSQL = "Select [ValveName] from tbValve Where [" & MyField & "] Is Null"
MTBLeave a comment:
-
If User is a global variable the code you posed will not work, even with the syntax error corrected.
I think your code should look like thisCode:DoCmd.OpenForm "frmSchedule", acFormDS, , [User] = '" & User & "' AND wrkDate = #" & Format(DateAdd("d",7,Date),"mm/dd/yyyy") & "#"
Leave a comment:
-
Hi
First thing I think thisCode:DoCmd.OpenForm "frmSchedule" acFormDS, , [User] = User
Code:DoCmd.OpenForm "frmSchedule", acFormDS, , [User] = 'User'
To incorporate a date filter you need something like thisCode:DoCmd.OpenForm "frmSchedule", acFormDS, , [User] = 'User' AND wrkDate = #" & Format(DateAdd("d",7,Date),"mm/dd/yyyy")
Leave a comment:
-
Hi
Apart from the syntax error in the MsgBox statement, I currently cannot see why this does not result in the last (Right) sheet name being returned.
If you get the first sheet name using this, what do get if you use xlApp.Sheets(1) .Name ?
MTBLeave a comment:
-
If anything inside square brackets is not recognised then you will be asked to provide a value manually.
However this can get confusing if there are other syntax errors. For instance in your early post I have just noticed this
[PupilOnRoll],*
has a comma when a period is required.
If that does not progress it any, then I suggest you (temporarily) simplify the whole thing to and just include the field/tables...Leave a comment:
-
AS I said before you do not say which parameter it request, but I think you have missed the space from the table name.
ThisCode:WHERE (Left([MissingUPNs].[Forename],3)=Left([PupilOnRoll].[Forename],3))
Code:WHERE (Left([Missing UPNs].[Forename],3)=Left([PupilOnRoll].[Forename],3))
It is not considered good practice to have spaces in table or field names!
MTBLeave a comment:
-
Without seeing the full query difficult to be sure, but you may be missing a final closing bracket, ieCode:WHERE (Left([MissingUPNs].[Forename],3)=Left([PupilOnRoll].[Forename],3))
MTBLeave a comment:
-
Hi
You do no say which parameter is requested, but I thing thisCode:Left([PupilOnRoll],3)
Code:Left([PupilOnRoll].[Forename],3)
MTBLeave a comment:
-
Hi
Without seeing you query it is a bit difficult to suggest a definitive answer, but I imagine somewhere you will need something like thisCode:WHERE Left(tblOne.Forename,3) = Left(tblTwo.Forename,3) AND tblOne.Surname = tblTwo.Surname AND tblOne.DOB = tblTwo.DOB
HTH
MTBLeave a comment:
-
Hi
Not sure what you are trying to do but perhaps this is what you want.Code:Private Sub NextDue_BeforeUpdate(Cancel As Integer) If Me.NextDue > Me.EndDate Then MsgBox "Check Rent Review Date" Cancel = True ElseIf Me.NextDue < Date Then MsgBox "Date in Past" Cancel = True End If End Sub
...Leave a comment:
No activity results to display
Show More
Leave a comment: