Modules & VBA :: Offset Center Pop-up Form

Jan 21, 2015

I am using the below code to centre a popup form, both horizontally and vertically. All my non-popup forms are 25cm wide. It looks weird that the popup forms appear on the centre of the screen, when the centre of the form is more towards the left. This is especially true in widescreens. How can I alter this code, so that the popup form appears on the centre (horizontally only) of the first 25cm of the screen.

25 cm = 9.8425 in = 14173 twips = 945 pixels

Code:
' API declarations:
#If Win64 Then
Private Declare PtrSafe Function apiGetClientRect Lib "user32" Alias "GetClientRect" (ByVal hwnd As Long, lpRect As typRect) As Long
Private Declare PtrSafe Function apiGetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hwnd As Long, lpRect As typRect) As Long

[code]....

View Replies


ADVERTISEMENT

Modules & VBA :: How To Center Logo In HTML Code

Jul 22, 2015

I'm try to centre a logo image in the middle of email but I having issue doing it doesn't seem to matter what I try I can't seem to get it to do what I want . The code below works but doesn't centre the image

Code:
Dim txtLogoURL As String 'this is for your logo
txtLogoURL = "C:UsersDellPicturesoie_transparent.png"
strHTML = strHTML & "<p>"
strHTML = strHTML & "<a href=""http://www.testing.com/""><img border=""0"" src=" _
& txtLogoURL & "' align='Centre' width =200" & " alt=""testing"" /></a>"

View 6 Replies View Related

Center Form When Maximize

Aug 21, 2005

When i make the maximized on opening by docmd.maximize, coud i get the form centered too?
right now im just adding form space on the leftside so it comes somewhere in the middle but if somone has a diffrent ressolution then it wont work as well.

View 3 Replies View Related

Auto Center

May 19, 2006

Why is it that auto center doesn't auto centre? Yes it centres horizontally - but not vertically. Does anyone know how to actually center horizontally and vertically i.e centre!? (I have used both spellings in order to appeal to a larger audience!)

View 4 Replies View Related

Call Center Operation

Feb 25, 2008

Hello All,

I have a call center and Im trying to work out a call que.

I have 8 operators.

10000 records that need to be called.


I'm trying to create a query that will select the first record avilable from my table. when the next operator has completed his call do the same thing and so on without duplication of efforts.

Any help would be appreciated

Rich1968

View 4 Replies View Related

Auto Center Forms & Reports

Mar 19, 2007

I have quite a few forms and reports in a database that are pop-up and modal. I've also auto centered them so they do not jump all over the screen. However, these forms and reports are centering when you open them but move whenver you close them. I am hiding the database window, which usually means that it minimizes to the upper left corner of the desktop screen. These forms then wind up closing or relocating to where the minimized database window is. Is there any way to fix this problem so that the users see centered forms and reports every time they are using the program?:eek: Thank you

View 1 Replies View Related

Reports :: Center Check Box Under Label On Report In Access 2007

Mar 21, 2013

I have created a report with the report wizard in Access 2007 that includes a check box. The check box is located under the label but to the far left side. How can I center the check box under the label?

View 10 Replies View Related

Reports :: Call Center - Creating A Report To Show All Associates Under Error Type?

May 23, 2014

The database is to track and evaluate call center associate phone calls. I created yes/no fields for multiple common errors (accurate/complete, Security, and client experience. and under each are @ 20 common errors)

(the problem is that I did not create a seperate table for each main category which I think might have made things easier)

Now what I am trying to do is create a report that allows me to show (or select) an error and have it show all the associates that had that error in a given time frame.

I already have a report to show all associates and all the errors that each had in a certain time frame. (so vertically I have associate detail and horizontal I have error detail).

is there a way, without creating 25 separate reports, to show all associates under an error type?

View 3 Replies View Related

Modules & VBA :: Retrieve / Validate Data On 2nd Form Based On Record Selected On 1st Form

Jul 29, 2013

Can I look up and verify data on a "second" form based on a selected record from first (still open) form.

I am trying to allow users to select a User Name from a combo box list and then open "Change Password" form when they select "Change Password" for that selected user name.

My problem is that I can't figure out how to associate and verify the data tied to the user name selected on the previous (Login) form ( I am trying to validate the old password tied to that selected record).

I have the first login form created, and it's working just fine. I also have the change password form created (and it's displaying the user name selected from the first form using:

Code:
Private Sub Form_Load()
With Forms![frmLogin]![cboUserName]
Me.txtPwdChgUserID = .Column(2, .ListIndex)
End With
EndSub

I also have the code written to validate and confirm old password, new password and validate new password (when the save button is clicked). I have yet to update the password with the new password (still trying to figure that out).

Attached zip file has screen shots of the two forms.

View 3 Replies View Related

Modules & VBA :: Button On Form Which Calls Module To Show Calendar Form

Sep 11, 2014

I have a button on a form which calls a module to show a calendar form. The user picks date and time, and saves it. The calendar form closes and adds the date and time to a text box on the initial form.I want to save the record so that the underlying table/query is updated, but it's not working. The record is not saved until the initial form is closed.Here's the form vba...

Code:

Option Compare Database
Option Explicit
Private blnFlag As Boolean, blnSaveIt As Boolean
Private Sub btnDelete_Click()
On Error GoTo Err_btnDelete_Click

[code]...

View 3 Replies View Related

Modules & VBA :: Unbound Form - Selecting Label OnClick Does Not Recognize Changed Form Field?

Feb 5, 2015

Access 2007
Unbound Form

I have a onclick tied to a label (for decoration purposes) that when clicked it launches VBA that essentially updates a form. All that part works except it will not recognize any changed value of the field I was last in?

Just to try to explain best as I can what happens.

- Form gets opened
- I change field (quantity field)
- I click the Label
- It reverts to pre-existing value.

if I click off of the text field first then do the onclick - it recognizes just fine.

View 7 Replies View Related

Modules & VBA :: Export Specific Fields In Form To Excel Form

Feb 26, 2014

I have the form (PROJECT DETAILS) that displays a specific record's information, one record at a time.I would like to click a button to export 5 specific fields (name, phone, address) of that form ("Project Details"), based on the PK "AssignNr", and then insert those fields in an already created Excel form that has those fields blank, but other fields filled in.

And then, as part of the same macro, I want to have the Print pop-up come up in the Excel form to select where/how that file will get printed.I've tried exporting from the Project Details form, but it exports all the records. And then I am not sure how / where to code the vlookup formula (if that's even necessary) to take the data from the exported file, into the existing Excel form that needs to be filled in.

Can this even be done in one macro, or do I need to create two - one to export data from Access to Excel. And then another in Excel to vlookup the details from the exported file, into the existing Excel file.

It would be nice if I didn't have to put in what the vlookup criteria is. (i.e. AssignNr (which is the PK)) - if it could just be taken from the PROJECT DETAILS form's current record selection.

View 4 Replies View Related

Modules & VBA :: Passing Values Of Selected Items From First Form Until Third Form

Aug 12, 2013

I would like passing values from first form until third form.

In the first form I have a list box after selecting items (For each selected item in first form I have 4 values) and pressing button (or right click of mouse) the second form will be open, then in the second form I have 2 option (inserting, deleting), when I select inserting or deleting in the second form, third form will be open, in the third form there is a "OK" button, when I press that, passed values from first form will be used for inserting or deleting records to the table.

View 4 Replies View Related

Modules & VBA :: Adding Controls To Form And Saving Modified Form

Dec 3, 2013

I am trying to open a form in design mode and add controls, this i have done. I am doing this all in a class, and am having trouble saving the modified form.

I have tried using the following, both produce errors

Code:

DoCmd.Save acForm, "tmpQueryDes"
DoCmd.Close acForm, "tmpQueryDes", acSaveYes

View 3 Replies View Related

Modules & VBA :: Removing Form Instance From Collection Does Not Close Form

Nov 17, 2014

I am using the method from allen browne [URL] .... to open a form and add it to a collection and when removing it it closes. actually, usually it does work so but i have now a form which does not close until i am hitting the reset button in VBE , is there something i could check why it's not functioning as desired ?

Just to add, this form has a subForm as well (might be the cause ?)

View 2 Replies View Related

Modules & VBA :: Close Form With Another Form Saving Record First

Jul 30, 2015

I have a timer form which closes the database after a period of time with DoCmd.Quit. Another form is open at this point but if a user has left it in the middle of editing it I want to be able to save the record in the other form and close it before the timer form closes the database.

What VBA do I need in the timer form to save the record and close the other form before DoCmd.Quit? Just to be clear the code is...

Private Sub Form_Timer()
On Error Resume Next
Me.Tag = Val(Me.Tag) - (Me.TimerInterval / 1000)
Me.Caption = "The database will exit in " & Me.Tag & " seconds"
If Val(Me.Tag) <= 0 Then

[code]...

View 1 Replies View Related

Modules & VBA :: Linking Popup Form To Main Form

Jan 23, 2015

I have a 'main' table with a Project_Number that links all the data in my db together. I have another table that uses that Project_Number as a lookup field to connect that tables data to the main data. I created a 'main' form that has the ability to enter data for the 'main' table. I want to be able to press a button and have the second tables form pop up and add that that specific Project_Number. I added the button and went through the wizard process. I then added the linking info through the builder. It works fine if there is already data entered for the project_number in that specific field. but if the field is empty, the popup window doesn't recognize a project_number and doesn't add it to that record. below is what I am using. The project_number in the 'main' table is text and the Project_Number in the 2nd table in a number since it is a lookup field.

Private Sub CongressionalDistrictCmd_Click()
On Error GoTo Err_CongressionalDistrictCmd_Click
Dim stDocName As String

[Code]....

View 9 Replies View Related

Modules & VBA :: Copying Data From One Form Into Text Box On Another Form

May 16, 2014

What I'm trying to accomplish is some sort of 'Order Confirmation' (filled with the info i have entered in my order form and sub_form fields) that i can copy and paste as a reply to their email-order.

I have taken 2 failed approaches so far:

1) I used a report to display the info

Private Sub Command103_Click()
DoCmd.OpenReport "Order Confirmed", acViewReport, , "OrderID = " & Me!OrderID
End Sub

This worked fine until the information was copied and pasted into outlook which upon doing so changed the column titles and layout

2) I used another form with a text box to fill with the data entered on the Order form

DoCmd.OpenForm "frm_Order_Confirmation"
[Forms]![frm_Order_Confirmation]![txtConfirmation_Text] = "Ref.:" & " " & [txtCustomer_Order_Reference_Number] & [vbNewLine] & "Item No.:" & " " & [cboProductID].[Column](1)

I got stuck here when trying to reference the data in the sub form... Also each order can have one or more colours and how to allow for this?

View 2 Replies View Related

Modules & VBA :: Searching Form Along With Other Forms In One Navigation Form

Jun 11, 2013

I have used one of the members' code which was posted in a tread before to create a search box in a form. This code works perfectly when the form itself is open. Otherwise, when I put this searching form along with other forms in one navigation form, I get the following error: "Enter Parameter Value: Forms!FRM_SearchMulti!SrchText"...The code that was used for the Search box is as following:

Private Sub SearchFor_Change()
'Create a string (text) variable
Dim vSearchString As String
'Populate the string variable with the text entered in the Text Box SearchFor
vSearchString = SearchFor.Text

[code]....

View 7 Replies View Related

Modules & VBA :: How To Reference Form In Navigation Form

Aug 14, 2015

I have inherited maintenance of an Access DB that I did not design and I'm having trouble with their Navigation Form setup. I created a form with a list box and two date fields, and figured out how to build a filter for the form that would open a specified report on a button click. It worked great as a stand-alone form, but when I added it to a navigation control in a navigation form I can't seem to find the right path to tell the VBA where to look for the filter criteria.

In the screen shot, the report to be displayed is in the detail of the "Report Center" tab on the far right of the navigation form "Main." the form "FilterSelection" is inserted in the "NavigationControl0" section under the navigation tabs. Criteria is selected/entered in "FilterSelection" and needs to be passed to the filter of the report that is opened when the "Project Tasks" navigation button is pressed. As I mentioned, when I created the form I put a button on it to open the form with the filter (built via SQL in VBA) it worked beautifully. But now that it's on the "NavigationControl0" object Access errors and can't find the fields where the data has been selected/entered.

View 8 Replies View Related

Modules & VBA :: Transfer Company Name From One Form To Another Form

Jan 17, 2014

i have a customer form and on the form i got a button to add equipment which opens another form, my question is how can i get the same company name from the customer form to be in the equipment form once i press the button?

i have done this so far

docmd.openform "EquipmentF",,,(not sure what to put here....i've tried "company = '" & company & "'" but this just seems to open the first company)

View 11 Replies View Related

Modules & VBA :: Possible To Create A Form And Procedure Within That Particular Form

Oct 10, 2013

Is it possible to create a form and vb procedure within that particular form (ie. an OnClose event)?

Code:

Function CreateForm()
Dim Form as Form
set Form = CreateForm
frm.Caption = "MyNewForm"
frm.Recordsource = "Stuff"
'Do other stuff to form, save and close, open form again
[Forms]![MyNewForm].OnClose = 'insert sub and/or call to procedure (if possible, haven't been successful yet)
End Function

View 8 Replies View Related

Modules & VBA :: Error Msg On Form With Form Closing?

Nov 13, 2014

I got an error msg on form with closing. I have a main form (SalesReturnOrDamaged) and subform (SalesReturnOrDamagedSubform).

i have used a VBA code on main form Close Command button as per shown in Code Tag. But that is not working and shown an error msg as per screenshot. how to change that VBA code for empty form close without save the record?

Code:
Private Sub Close_Click()
On Error GoTo Err_Close_Click
If Forms![SalesReturnOrDamaged]![SalesReturnOrDamagedSubform].Form![ItemCode].Value = "" Then
Forms![SalesReturnOrDamaged]![SalesReturnOrDamagedSubform].Form![Product].Value = ""
Forms![SalesReturnOrDamaged]![SalesReturnOrDamagedSubform].Form![MRP].Value = 0 Or ""

[code]......

View 1 Replies View Related

Modules & VBA :: How To Update / Requery A Form From Another Form

Jul 18, 2015

How do you requery/refresh a form from within another form?

refresh formA from within formB in VBA?

View 14 Replies View Related

Modules & VBA :: Pass A Value From Form To Form

Aug 31, 2014

There's a button(Button1) on the main form (Form1) and on the second form (Form2).On Form1, I've got a link(LinkToForm2) to Form2.When people click on LinkToForm2, I want access to open Form2 and hide/show Button1 depending on whether it is shown/hidden in Form1.

Is there a way to, maybe, set a value on Form1_Deactivate (depending on whether Button1 is shown/hidden),So that, on Form2_Activate, it can check that value and hide/show Button1 accordingly?

View 3 Replies View Related

Modules & VBA :: New Entry Form With Value From Another Form

Jul 16, 2015

I have two forms. Main form called "frmCarV" and another form "frmEngine"

The form frmCarV contains the its ID called VID that is connected with the frmEngine also.

I made a button on frmCarV form that when click opens form frmEngine as a new entry (because the form is for entering certain data) with the VID field already filled from the VID field in the frmCarV form where data about each car is put.

This is the VBA I placed in the button in the Main form frmCarV.

Private Sub btnUnosEvidR_Click()
DoCmd.OpenForm "frmEngine", , , "VID=" & Me.VID
End Sub

When I click the button form opens but the VID field is not filled, it stays blank. Also the VID field in the form frmEngine is a combobox.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved