I have a Form that is modal and popup, and which opens without the MS Access in the background. It is like a separate window (piece of program) that runs under Windows XP.
If I move the Form on my screens (I have dual monitors) I would like that the messages that are triggered by various actions to appear on top of the form not - for example - on the other screen .
Is there a way to get a msgbox to show only when the db is open for the first time. So basically what I want is when I push an update it will auto check to see if the db is current if not then it closes an opens the new db. When it opens the new db i want it to display a msg box or form that shows the new updates. Then if they exit an reopen it wont show the option.
How can I show a msgbox with the text "Update in progress! Please wait a while", when I execute the following make table querye on form load?
Code: Private Sub Form_Load() 'Turns the Access warning messages off DoCmd.SetWarnings False DoCmd.OpenQuery "q_tblUdtrk2" 'Turns the Access warning messages back on DoCmd.SetWarnings True
hello all, i have a form which I have set so that it opens a blank record once opened. After it has been opened I want a msgbox to appear. my code so far is: --------------------------------------- Private Sub Form_Load() DoCmd.GoToRecord , , acNewRec
Select Case MsgBox("Please select the Registration Number from the drop down menu or type it in", vbOKOnly, "Select Registration Number")
End Select End Sub -------------------------------------------
but the problem is that the msgbox appears before the form is opened. any ideas how to fix this would be grately appreciated. thank you
I've added a message box to what is basically a standard simple to use access control, "closeForm", I'm a newbie working on learning access vb. I'm guessing my code if fudged. Any help is greatly appreciated.
Private Sub Close_Click() On Error GoTo Err_Close_Click Dim Answer As Integer Answer = MsgBox("Press Ok to Close, Cancel to Continue.", vbOKCancel + vbQuestion, "Exit Data Entry?") If vbOK Then DoCmd.Close
My database has two main tables: Table1 and History
Users can add data to this table and decide if store part of data into the History table using an append query behind a cmdbutton. I do this to create an Historical Log of my records.
I then have a main form (form1) with the following code on the OnCurrent event:
If Not IsNull(DLookup("[SSN]", "history", "[SSN] = '" & [SSN] & "'")) Then msgbox "Record present in the Historical Log!", vbOKOnly, "Warning" end if
I would now like to change this code so that users are prompt with a message that allows them to either open the form1 or the Historical log (frmHistory)
I would need something like this but cannot get it to work:
If Not IsNull(DLookup("[SSN]", "history", "[SSN] = '" & [SSN] & "'")) Then msgbox "Record present in the Historical Log!", vbYesNo, "Warning" If vbYes Then DoCmd.OpenForm "frmHistory", acNormal, "qryhistoryfrommsgbox", "", , acNormal
If vbNo Then ' 'open the regular form1.
Another thing I cannot figure is why this pop up msg comes up even if I close the form. Is there a way to revome it from the close form event?
I have a form with one field on it. I want to be able to look up a value on this form and based on whether it is in the table or not give a message box saying yes it is there, or no it is not and then reset the form to look up another value.
I currently have an unbound form I am using as a switchboard. When a button is pressed it loads a form asking for the user to enter their password (the swtichboard is then closed). If the correct password is entered the form opens to their details, when that form is closed, the swtichboard re-opens. I want an action that if the correct password is not used, then a msgbox lets them know and then the Switchboard they were at re-opens. So far I have the following code:
Private Sub Form_Open(Cancel As Integer) If Me.Recordset.RecordCount = 0 Then MsgBox "Incorrect Password!" Cancel = True End If End Sub
This works well, but I am unsure how to write that after the msgbox I want the Switchboard to open. I tried to add "DoCmd.OpenForm frmSwitchMain" in various places, but I am unsure on the proper procedure to do this.
I have a list if names, some with a middle initial and some without, that are all in one field. eg George P Wingrove or Ada Wingrove. Can I run a query that will seperate the name into two or three fields? I have tried the following in a query, but not being very successful. FirstName:Left([Name],InStr(1,[Name]," ")-1), MiddleInitialTrim(Mid([Name],InStr(1,[Name]," ")+1,InStr(InStr (1, [Name], " ")+1,[Name]," ")-InStr(1,[Name]," "))) and LastName:IIf(InStr(InStr([Name]," ")+1,[Names]," ") <>0, Right([name],Len([name])-InStr(InStr([Name]," ")+1,[Name]," ")),Right([Name],Len([Name])-InStr([Name]," "))) Unfortunately, it puts #Error if there is no middle initial. Any way round this problem?
'Filter frmRhinitis based on search criteria Form_frmRhinitis.RecordSource = "select * from tblBaseline where " & GCriteria Form_frmRhinitis.Caption = "Customers (" & cboSearchField.Value & " contains '*" & txtSearchString & "*')"
MsgBox "Results have been filtered."
End If
End Sub
However, even if no records match the criteria the window will return a "Results have been filtered" but return a blank form. How do I include code that will return a "Match cannot be found" MsgBox if the search string isnt found?
Is it possible to set the Tab Order to move to a subform before all the controls in the Main form have been passed through, and then come back to the Main form where one left off?
I have a form with a client name and a chargable service, a subform with products and, on the main form again, amount tendered.
Logic dictates that one select all items for which one is paying before showing how much is paid.
Right now, I go through the client info, then chargable service, amount tendered, and then anything purchased on the subform. That's kinda bass ackwards.
I'd somehow like to insert the subform's controls into the Tab Order, after chargable service and before amount tendered.
I have a form with various text, date and combo controls. There is a button at the button that runs a macro (Close NB) at the bottom. What I'm trying to do is bring up a msgbox if certain fields are blank and not run the macro. I only want the macro to run if all the fields specified have data in them.
The fields are : cmb_cliname cmb_disease cmb_projectType cmb_ProposalStatus
The on click code is: If (Me.cmb_cliname Is Null) Then MsgBox "Please fill in the relevant details", ElseIf (Me.cmb_Disease Is Null) Then MsgBox "Please fill in the relevant details"
I use filter Combo boxes in a lot of places so that users can filter records easily. (Not combo boxes for input).I have them labeled as filters but nonetheless users keep trying to input into them for some reason.How would I add a message box to it so that it states that 'this box is not for data entry etc'.
Ok Im having trouble with this, I need to remove cities from an address field but don't know a simple query that does this. Can any body help
heres an example
Address1 City 10/F, HONG KONG LAI CHI KOK EXCHANGE IIHONG KONG
Now I want to be able to pull Hong kong out of the address1 field but without searching in the address field with *HONG KONG* as this would involve checking every city in a table.
Is there an easy way to split a full name into firstname, middle name and lastname? I have a field name with names such as James R Lowes and i would like to split the name in 3 like. Firstname : James Middle Initial: R Lastname: Lowes
I was able to find a module to extract the first name from a string, but don't know much about VB and cannot figure out to do the rest.
Is there an easy way to split a full name into firstname, middle name and lastname? I have a field name with names such as James R Lowes and i would like to split the name in 3 like. Firstname : James Middle Initial: R Lastname: Lowes
I was able to find a module to extract the first name from a string, but don't know much about VB and cannot figure out to do the rest.
I'm trying to improve the dialer that i place on microsoft access forms. basically there's a command button that dials the number that is in a text box, but we have a new job that's just come in that requires numbers to be copied and pasted into the text box. these numbers have a space between the dialing code and the telephone number and i need to make the dialer check for a space and remove it before dialing.
Here's the code for the dialing buttons:-
Private Sub cmd_Dial_Click() On Error GoTo Err_cmd_dial_Click CT.MakeCall "8" & txt_telephone.Value & "#", "", False, "", "", False
I'm working with a DB to enter orders for picking. I have an item list that I'm linking to when entering orders, and bringing in the data from the item list such as item location etc.
It's setup right now that when I type the first couple of letters into the item field it automatically brings up the matching items and if I click enter it completes the item and brings in the other fields from the item list.
Example: If I type in 'tom' I get back 'tomato', 'tomato sauce' etc. and when I choose the right one and hit enter it fills up the rest of the required info such as item location.
What I would like it to do is have the auto complete also check for middle words.
Example: when I type 'alm' it returns 'almonds', 'almond milk', but don't return 'container almonds' or 'container roasted almonds' etc.
I have a field that contains 12 numbers. I need to replace the middle four numbers with a character so that the entire number is not readable. How do I do that?