Modules & VBA :: Form Stays In Front When Table Opens

Jul 6, 2014

I have a Form with a control button that opens a Table using VBA code.

I have made quite a few similar databases before and usually when the Table opens it opens "above' or in front of the Form.

This time the Table opens but behind the Form.

I would like the Table to open and appear in front of the Form.

Is there a setting or something to control which displays on top?

View Replies


ADVERTISEMENT

Modules & VBA :: Unbound Subform Has No (null) Records - Form Stays Blank

Aug 4, 2015

The unbound Parent form has a listbox (SQL Server) , the selection updates the SubForm with a primary key ID. The Subform is a ReadOnly view from an Oracle Linked table. It populates with a Select * From Oracleview where ID = listboxID The code is at the link shown below update: The subform uses textboxes linked to the read-only record.

The main form can populate, no problem. However the SubForm data source is either populated OR is Null.

If it is Null, the subform stays blank. Two Objectives:

1. Set a boolean variable flag in the parent (main form) that subform record exist or that it is null. e.g. Parent obtain recordset count property from Sub form
2. Display the subform with blanks.

[URL]

View 3 Replies View Related

Modules & VBA :: Record Data When A Form Opens

Feb 11, 2015

I'm trying to add data about a form to a table when the On_Current event fires. The data I want to add is:
windows login username

date and time the On_Current event occurred
name of the form that was opened
that the form was opened
the number of the record (ID) in the table the form is based on

I have the following code

Private Sub Form_Current()
If Me.NewRecord Then
Call FlimOpen("OR IR No", "OPENED")
Else
Call FlimOpen("OR IR No", "OPENED")

[Code] ....

Excuse the use of 'FlimOpen' but I needed a unique word that I would remember (inspired by FlimFlam the cat on the children's channel CBeebies here in the UK)

I try to compile and I get an error about the wrong number of arguments or invalid property assignment. However, the event does fire correctly when I open the form or move from one record to another so something's working!

View 1 Replies View Related

Modules & VBA :: Hide Subform When Main Form Opens

Jan 9, 2015

I need to hide my subform on load or open of the main form but am experiencing some weird results. I have tried putting Me.SubForm.Form.Visible = False in both the on open and the on load of the main form and it works only if the tables on which the subform have records in them. If the tables for the subforms are empty I get an error 2467 telling me that "The expression you entered refers to an object that is closed or doesn't exist." I find this strange because from all I can find the subform loads first.

How can I hide the subform when the main form opens no matter what records exist or don't?

View 6 Replies View Related

Form Opens When Database Opens

Aug 16, 2007

How can I get a form to open when the database opens?

View 5 Replies View Related

Modules & VBA :: Form With Textbox With LinkedIn Profile Address - Hyperlink Opens Twice

Jul 1, 2015

I have a form with a textbox with the "LinkedIn" profile address that I want the user to be able to pull up when they click a command button. It works, except that the link opens twice in two tabs in the browser. I've checked over the code for the whole form, and this code is only being run from the click event of the button, so why would it open the same tab twice? Here's the code:

Private Sub cmd_Click()
Dim ctl As CommandButton
Dim txthyper As String
Set ctl = Me!cmd
txthyper = Me!LinkedIn

[code]....

View 3 Replies View Related

Modules & VBA :: Keep A Form At Front But Still Be Able To Use Other Forms

Nov 5, 2014

I am after a script to lock a userform to the front but still be able to work on other forms.

I have an excel userform in access which does this and better still it is like a sticky note as it stays on the screen even when going to another program, but as I am working in vba all day long, every time I change something the form closes, it works great when not using vba though.

View 14 Replies View Related

Modules & VBA :: Replace Line Of Code During Split Form Front End Deployment?

Aug 11, 2015

I have a database that I've split and have deployed to 7 persons.

The thing is, I have three (3) forms:

Form 1
Form 2
Form 3

...that require changing a portion of a line in each form's respective VBA codes. I need to change the directories to where an excel workbook is stored after exporting, and another is where same excel is moved to after being uploaded.

At the moment, during deployment I have to manually change the directories.

I was thinking of maybe a pop-up form with four (4) fields that allows the user to select his/her name at the start-up of their frontend app, and paste the directories in the other text boxes provided.

This information will then be used to replace the directories in the VBA.

If I were to make changes and have to redeploy, I would have to do everything manually again.

View 6 Replies View Related

Modules & VBA :: Using Unbound Form On Front End Of Database To Populate Backend Tables

Apr 12, 2015

Is there any particular reason I would choose to use

DoCmd.RunSQL "insert into...

Versus

CurrentDb.Execute "insert into.... ??

I am using an unbound form on the front end of my database to populate the backend tables (multiple tables). Some forms only have a few fields, while other forms have about 15 fields with 3-4 tables updating.

I am okay using the DoCmn.RunSQL , but I keeping reading on the forum that others chose CurrentDB.Execute and it has me thinking.

My database is stored on a network drive with only on front end.

View 2 Replies View Related

Opening A Report Instead Opens A Form (which Opens A Report)?

Jun 15, 2005

Hi,

I've been given an existing database to modify, and I'm struggling somewhat to see how the author has implemented certain functions.

On a main menu form (autoexecs on starting the database), there are various "Search By" option buttons to generate a report, ordered in various ways. The "On Click" field for each of them refers to a macro, called Buttons, and a line in that macro dependant on the type of search (e.g. OnClick = Buttons.byPerson).

The Buttons macro runs an OpenReport command, the report corresponding to the search type (e.g. Buttons.byPerson has an OpenReport command for the "Report by Person" report).

However, when I click the search buttons (or indeed run the corresponding reports) I instead get another form which allows the search criteria to be specified - this then generates the report (I would assume based on the relevant query - e.g. Person Query), but I cannot understand how this works.

Google searches have not helped much as I can't seem to find an adequate search phrase to use, and I've been staring at the thing for some hours now. Any help getting me off in the right direction would be much appreciated!

View 4 Replies View Related

List Box Stays On Top :(

Feb 15, 2006

I have a list box on a form, as well as a tab control...I need the tab control to be on top of the list box...I tried doing Format > Send to Back (list box) or Bring to Front (Tab Control)...but to no avail..

List box still stays ontop...any ideas?

Thanks :)

View 4 Replies View Related

Modules & VBA :: SHELL Command Always Opens The Folder Minimized

Sep 30, 2013

I'm trying to use this command:

Code:
Shell "C:WINDOWSexplorer.exe """ & Me.txtSource & """, VbMaximizedFocus"

to open a folder from within Access 2007 & Windows7. It works, but it always opens the folder minimised, whether I use VbMaximizedFocus or VbNormalFocus. It used to work properly in Access 2003 & WinXP.

View 2 Replies View Related

Message Box That Stays After You've Clicked Yes

Mar 12, 2006

I've got this yes/no message box that deletes an appointment. When i click yes to confirm delete, the box just stays there. I have to click yes again before it works. Clicking no works fine. Its like its going round the else if statement for vbYes twice. Does anyone know why this is happening? Heres a snippet of the related code. Thanks in advance.

If myYesNoQuestion(strDelete) = vbNo Then
myDisplayInfoMessage "Appointment kept on file"
'If the user decides not to delete the customer then appointment kept
Calendar3.SetFocus
'Sets the focus away to allow the rooms to be disabled
lstRoom1.Enabled = False
lstRoom2.Enabled = False
lstRoom3.Enabled = False
lstRoom4.Enabled = False
'Disables the rooms again

ElseIf myYesNoQuestion(strDelete) = vbYes Then
strSQL = "DELETE * FROM tblAppointment where [AppointmentID]= " & .Column(2)
'SQL to delete appointment from table
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
'Turn warning off, run SQL, turn them back on again

myDisplayInfoMessage "Appointment Deleted OK"
'If the user decides to delete the customer then record is deleted and a message is shown to prove that
Calendar3.SetFocus
'Sets the focus away to allow the rooms to be disabled
lstRoom1.Enabled = False
lstRoom2.Enabled = False
lstRoom3.Enabled = False
lstRoom4.Enabled = False
'Disables the rooms again

End If

End If

View 5 Replies View Related

Modules & VBA :: Shell Picture Viewer Command Opens Minimized?

Aug 13, 2015

I'm having trouble with a shell() command in my vba.

I'm trying to call up the picture viewer showing the file of the photo I clicked on in a form. Everything is happening as expected - the file opens in Windows Photo Viewer, but it is minimized.

I can open a picture fine from Windows Explorer, but something about my shell command is forcing a minimize.

Here is my code:

Code:
Dim sFile As String
PicFile = "C:Pics" & Me!PicName & ".jpg"
Shell "RunDLL32.exe C:WindowsSystem32Shimgvw.dll,ImageView_Fullscreen " & PicFile

I would have assumed ImageView_Fullscreen would do what I want!

View 4 Replies View Related

Modules & VBA :: Excel File Opens And Code Stops Execution

Nov 12, 2014

I'me running on Win7, Office 2010, Acc2003 format (.mdb), writing data to Excel 2010 (.xlsx)I have code to create an Excel file, send record set data to it, and then add some formulas and formatting. I was trying to tune up the formulas, when I got a pull back:Access VBA code suddenly stops running, and the file gets displayed in Excel

Code:
'ApXl is Application.Excel
'xlWSh is the Excel WorkSheet
'rst is my DAO.Recorset

[code]...

The same happens when I have ApXl.Visible = True

View 10 Replies View Related

General :: Command Button Stays Active

Feb 17, 2014

I have a macro that Runs from a button that I attached to a form called " plans" the macro opens up a Dialog form from which I select a drawing number from, on selection of that drawing number a query is run and finds the information I want

The problem I am having is when I close the query the macro button goes active so if I want to run another query using the button it goes to the last record I selected. I have tried the refresh command but that does not work..I really need the button not to be active when the query is closed.

View 3 Replies View Related

Go To Last Record When Form Opens?

Nov 21, 2006

I would like my form to open and automatically go to the end of the records, so I don't have to navigate to the end before I start entering data.

I have seen a form do this but can't find out how.

Thanks

View 6 Replies View Related

Event From One Form That Opens Another Form: How Do I Open To The Right Record?

Nov 7, 2006

I have code for a button click event. Essentially I have a main table form that I use to enter customer data and info. I also have a button that I use to add that customer to a separate table that I use for special Customers. My code copies all the data I need copied to my other table, so I wont waste space here typing my code that actually copies the data to the new table. What I will list are the two commands I am using after that code, to close the current form (the one with the button) and open the form for entering special customer information (the form to edit data on my other table). It works flawlessly, but when it opens the other form, it opens to the first record. I want to know how to make it open to the record which I was viewing when I clicked the button to copy the data.


DoCmd.OpenForm "Special Customer Data Entry", , , Number = Me.Number
DoCmd.Close acForm, "Customer Data"

View 9 Replies View Related

Subform Opens New Form That Gets Its Info From Main Form

Dec 20, 2011

I'm working on a project that has two tables. "Calls" and "Customers". The Customers form has a subform, "Calls Subform" in it. When you click on the (New) Hyperlink a new form opens, "Call Details". I would like to pull information off of the "Customers" Form and insert it into the newly opened "Call Details" form.

Problem #1) Home Phone (named "Phone" and Text223 (named "CID"): are both bound controls so I have to do this in an OpenArgs type process.

Further details:

On "Customers" the following is true:
"25" is the "ID" for that customer on the "customers" table
"Home Phone" is the home phone number on the "Customers" table

On Call Details the following is true:

Home Phone is Bound to a table "Calls" and needs to pull it's data from Customers Form..Text223 is CID and bound to the table "Calls" and needs to pull it's data from "Customers" form.

View 14 Replies View Related

Show Only Form When Database Opens

Mar 8, 2005

I am sure this has come up a thousand times and I searched but could find nothing about this. I have a database with one main form and many queries. When the database is opened by users I would like for only the form to show. I do have queries in a dropdown list on the form to run. Basically, I only want the form to show when the database is open but I want to be able to get to the menu's etc when I need to.

Please help.

View 3 Replies View Related

Have Controls Null When Form Opens

Dec 14, 2005

What is the best way to have all controls in a subform empty when form opens? The form and subform are bound.


The following:

Private Sub Form_Open(Cancel As Integer)
Me.textDate = Null
End Sub

Produced error - "cant assign a value to object"

thanks in advance

View 6 Replies View Related

Form Opens To Wrong Record

Sep 21, 2006

I have a form based on a query. The query sorts records by ID number. When I open the form, it opens to a record that is not the lowest ID number. It's the same record each time that it opens to, but it's not the correct record There is no filter or sort order on the form, and it seems like starting with record 2 it is sorting correctly. any ideas? thanks.

View 1 Replies View Related

Filter A Record When The Form Opens

Jan 30, 2008

This is the first time I've used this forum so, hello everyone

My first question is about filtering a form

When a user is in the menu screen and selects a command button to view details, the next form that loads shows every record within the main table. So the user can use the navigarion buttons to go through each record.

There's search criteria on this form so the user can select which ever record they like.

Because of speed issues, I'd rather the form filtered a record (whichever one) as soon as they pressed the command button.

I've thought about how i'd do this and can't really come up with much; looked at openargs but my VBA isn't that hot yet

Does anyone have any ideas?

Thanks in advance

View 3 Replies View Related

General :: Form Always Opens On A New Record

Nov 14, 2013

I have a form that I built with the intention of creating new records. I want to convert it to use with existing records too. I can't seem to get it to look at anything but new records. I imagine it is a property setting and something very minor to a seasoned Access programmer.

View 14 Replies View Related

Forms :: Form Opens A Web Page

Jul 21, 2013

Whenever I open this form I get this message. Form opens a web page.If I open that web page with browser I don't get this message.

View 2 Replies View Related

General :: Combobox Opens A Different Form

Aug 26, 2013

I have a form with a combobox. From this combobox I would like to trigger the opened of a different form with the name and surname of the patients selected into the combobox.

I used this vba code

Private Sub Find_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ID Patient"
stLinkCriteria = "[PTS]=" & Me.Identification

[Code] ....

The problem is that when the form Id patient is already opened every thing works fine but when the Id patient form is not opened it looks like if the combobox was not able to trigger the form with the name and surname of the patients!

View 8 Replies View Related







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