OLE Objects In Forms / Subs

Nov 13, 2006

I wish to in a subform where you can enter a image for a item.

How do you go about having a box you click, find on your HD the image and then have it display for that record you select?

View Replies


ADVERTISEMENT

Pass Values Between Subs

Oct 4, 2005

Not been doing this too long, but have a question. Have a sub that determines which checkbox(s) are selected. I then want to get the value from that sub and use it in another sub that runs a query to populate listboxes.

Code so far
Public Sub TransportMode()
If Me.checkAir = True Then
strtypes = strtypes & "'Air',"
End If
If Me.checkCar = True Then
strtypes = strtypes & "'Car Hire',"
End If
If Me.checkAll = True Then
strtypes = "'Air','Car Hire',"
End If
strtype = Left(strtypes, Len(strtypes) - 1)
MsgBox strtype
End Sub

Public Sub FromToUpdate()
TransportMode

strSQL = "SELECT DISTINCT MasterTable.From FROM MasterTable WHERE MasterTable.Type IN (" & strtype & ")"
If Len(strbgs) > 0 Then
strSQL = strSQL & " AND MasterTable.BGID IN (" & strbgs & ")"
End If
MsgBox strSQL

How ever when get the message box, the value from first sub is not used by the second. How can I call it across? I'm trying to put bits of code like the first sub into many different sub as they are used again when buttons are pressed on the form etc.

cheers
Matt

View 1 Replies View Related

Modules & VBA :: Calling Variables From Other Subs

Oct 29, 2014

I have been tasked to create a multi-keyword search form, however, my form isn't working right and only the first record of the table is opened.

Code:
Public Sub txtSearch_AfterUpdate()
Dim strWhere As String
Dim strWord As String
Dim varKeywords As Variant
Dim i As Integer
Dim IngLen As Long

[Code] .....

These are the codes that I am using for my search form. I have a feeling that I am not calling the variable from the after update portion the right way.

View 14 Replies View Related

Main Form (2 Pages) With 2 *Subs On Page 2?

Jan 27, 2005

The title of this thread was hard to nail!!

I have a 2 paged Form. frmCustomer (page1) and frmCustomerOrderHistorySub1 and frmCustomerOrderHistorySub2 (Page 2)

On customers form I have a command 'Customer Orders'. When clicked focus is set to 'Page 2'. Page 2 should (and does) display ALL orders placed by the Customer currently being viewed on Page 1.

Problem: frmCustomerOrderHistorySub2 ONLY displays the details for the first order?

If you select the second order then the order details do not update?

I hope the attcahed DB will explain all?

I have spent a good few hours on this. Happy I got most of it to work unaided, could do with a nudge on this final issue.

Thanks for any help in advance.
Phil.

View 2 Replies View Related

Any Limit To Number Of Functions / Subs In Form Module?

Jan 8, 2015

Is there a limit to the number of fucntions/suroutines in a Form's module. I got an overflowerror when compiling and I moved a fucntion from the Forms mdoule to another module and the error did not re-appear.

View 5 Replies View Related

Forms :: Graying Out Objects

Jun 11, 2013

I currently have a small database where users input information on return parts. I have added a section to add data from testing and have made it so it greys out certain boxes when the part type is selected using conditional formatting. However conditional formatting will only allow either a data box (Text box) or the label attached to it to be formatted. I am unsure of how to grey out perhaps a rectangle I created when the part type is selected. I assume its coding which I am not the best at.

View 1 Replies View Related

Indexed Objects In Forms EG Label1(1).caption

Mar 22, 2006

Hi Guys (second post in 11 minutes!),

In VB you can index objects, and create duplicates of them, like this...
Code:Load label1(1)label1(1).Caption = "This is a label" But to do it, you must first create the original object in Design view, and set it's Index property to a number (there is an Index field in the Properties window in VB). For examle, to do the above I would create a label called Label1(0) in design view.

However, I cannot find this Index Field in the Properties window in Access - can you even create arrays of objects?!?!

Cheers.

View 1 Replies View Related

Forms :: Moving A Group Of Objects When Hiding Others?

Sep 16, 2013

I am building a form where I would like to group fields into 3 groups, A, B & C. I know I could put all groups on their own subforms but I'd like to see if there is a way to simplify it all on one form since there aren't much fields for each group.

I would also like to hide each group when the user clicks 'hide group A' and shift Group B & C up. Then move them back to their original position when 'Display Group A' is clicked.

Same for each group. If Group B - Hide is clicked, Group C is moved up.

I've got each group tagged appropriately and I can hide/display them all properly by a For Each Control loop. Now, how to I move them all up/down a specific amount in addition to that? I would think it would be just as easy but my objects are moving by using the Grid Y property

View 6 Replies View Related

Modules & VBA :: Referring To Forms Objects Using Variables

Sep 30, 2013

I have a simple date stamp that works great in a private sub within a form. (error handling removed for clarity)

Code:

Private Sub btnDateStamp_Click()
' UserInit is global variable
Me!Notes.SetFocus
Me!Notes = Chr$(13) & Date & " - " & Time() & " - " & UserInit & _
" -" & vbCrLf & Me!Notes

[code]...

I am rewriting it as Module function that is Called from various forms, to save space. The function receives the parameters varFormName and varControlName. I wish to write the results of the function back to a memo field on the form.I am stumped at the get go by the need to refer to the Forms controls with a full reference instead of the Me command.

Code:

Function DateStamp(varFormName As String, varMemoName As String)
'varInitials, varFormName, varMemoName are global variables
Forms!varFormName.Controls!varMemoName.SetFocus ' Error here
'Me!Notes = Chr$(13) & Date & " - " & Time() & " - " & varInitials & _

[code]...

how to refer to the forms control's with their full reference, from within the Module's function, the rest will fall into place.

View 3 Replies View Related

Forms :: Clear Fields In Linked Objects

Jul 16, 2015

I am currently working on a main form in Access 2010 which includes quiet a lot of fields, therefore i choose to create parts of it (which are as well optional, as they do not apply to all records) as different forms which i linked to the "mother" form afterwards through a checkbox by using the following code:

Private Sub chkMajor2_Click()
Dim strformname As String
If Me.chkMajor2 = True Then
strformname = "Major 2"
DoCmd.OpenForm strformname, acNormal
End If

[code]....

to make the next form visible for selection after filling in the current one...something like an "add more.." field actually, which i choose to represent as checkbox.The issue that i encounter is that when i click the "Add New" button in the main form, it doesn't clear also the fields in the linked forms. Is it possible to do that with a VBA code? Or how should i proceed?

The current code that i have for the button is:

Private Sub cmdNew_Click()
DoCmd.GoToRecord , , acNewRec
End Sub

View 9 Replies View Related

Forms :: Simple Combo Boxes Causes Objects To Flicker?

Oct 17, 2013

I am building a simple form with a few Combo Boxes, text boxes and a picture. When two out of the three Combo boxes updates a few text boxes, labels but not all and the picture flikers/blink. I do have one other combo box that does not cause anything to flicker once it updates. This is getting annoying and it makes my form look unprofessional I do not have any vba or macros running yet on the form - I have tried different ways to creat the form IE. Form Wizard and Blank Design. I used the Look up wizard for creating the text boxes/ Combo boxes in the database.

The other thing I noticed is that when in design view the same objects blinks when I scroll up or down loger than the other objects.

I did search this site and the web but did not find anything that did not metion VBA code and the Echo on/off.

Access 2010
Windows 7

View 10 Replies View Related

Forms :: How To Hide Database Objects And Show Once Closed

Jan 5, 2014

I have a database with a main menu which opens up on start-up it works fine and all but I want to go the extra step, I wish to disable / hide the ribbons (Top and Bottom) - Or Hide the whole Microsoft Access Window and display my form with the desktop behind it.

The next thing is once I click the X or the button to close the form I want Microsoft Access to appear again as in everything to show itself again.

View 1 Replies View Related

Forms :: Rich Text Box - Dynamically Populate Control With Embedded Objects At Run Time

Mar 29, 2015

From a info sheet on RTB Using the Add, Clear, and Remove methods, you can dynamically populate the control with embedded objects at run time. Can those 'embedded objects' be controls, e.g. list boxes, labels etc ?

View 3 Replies View Related

OLE Objects

Jun 29, 2007

Hello,

I was wondering...i put a microsoft doc in an OLE Object and in Pages or Form, i'd like to call the object to open up. So if i have a word doc stored in the OLE, i want that word doc opened up using a hyperlink or command button of some sorts, is there a way to do it????

Please help,

Thank you in advance!

View 1 Replies View Related

Grouping Objects

Mar 9, 2008

Hi,

can form objects be grouped? i currently have numerous buttons on a form that are shown according to a button selection. my current code makes all buttons visible / invisible singularly but i wiondered if they could be grouped/ named and the get the code to make the group visible / invisible?

many thanks,

NS

View 4 Replies View Related

Form Objects...

Jan 28, 2005

Is there a function that allows you to select all of the form objects.

What I want to do is to select all the form objects...have the user select a # from a drop-down list. Then set the font-size property to all of the form objects to that #. Does that make since?

Is this possible?

View 1 Replies View Related

Need Some Help With OLE Access Objects

Feb 13, 2004

I was wondering is anyone could help me with a problem thats been vexing me all day..

I have an Access database that has a number of Word documents stored as OLE objects. What I need to do now is create a macro within Word which, based on a few parameters, retreives these Word Docs from access and formats them into a completed document. The ordering and formating bits fine, where I'm stuck is getting at the OLE objects.

Can anyone give any advice on a possible solution?

Thanks, D

View 2 Replies View Related

Objects In A Form

Jan 3, 2005

Hi Guys,

This might be very simple but this driving me crazy...
None of the objects created on my form are appearing in Form View mode but I can see all the objects in 'Form Design mode'. I checked the properties of the form and all other objects to make sure 'Visible' property is Yes. Any help to solve this is highly appretiated.

Thanks in advance.
binjos

Note: This is happening to the new forms too..

View 3 Replies View Related

Can't Find Database Objects

Jun 2, 2005

Hello,

I am a novice when it comes to the MS Access interface. My experience has been designing the database and then using ASP pages to query, update, etc. I am now in a new position where I have to modify a switchboard to point to other data sources (i.e. databases) who have been renamed. My problem is that when I open any of those databases all I get is a form (switchboard) that has links to reports. It appears to my novice eye that the switchboard is the only thing that exists within the "main" database and it points to other databases -- when I open those databases another switchboard comes up and I still cannot view the database objects. I hope this makes sense -- believe me, I am attempting to understand this all.

I hope someone can explain to me what's going on -- there has to be a database that I can open and see actual database objects by going to the top menu bar and selecting, "View --> Database Objects --> Tables, Queries, Forms, etc.

Please help!

Thank you!
:confused:

View 1 Replies View Related

Thumbnail As OLE Objects In Database

Jul 11, 2005

Hi!

I want to display 8 thumbnail images at a time per form of records that matched a search critera in a form. But it seems like a form is suppose only to have one record at a time? I want to have a "next 8 thumbs"-button so it gets easy to browse the pictures.

I'm very thankful if you could help me with this! Please give me some advice.

Thanks!

Best regards
Johan

View 4 Replies View Related

Relationship Table For Other Objects

Sep 18, 2005

I am looking for an easier way to confirm that all a queries that are in a database are being used by the database. I started going through each and every one and it is taking for ever!

I have tried the documenter and either I cannot understand it properly or it does not contain the information that I am looking for.

An example might be I have a query called qryOne. I want to see where it is being used so I am looking for a “list” that says

qryOne = rptOne
qryOne = rptSix
qryOne = rptEightySix

Obviously these are just made up names, but I hope you understand what I am looking for. In essence a relationship table for queries, forms and reports.

Thanks for your help

View 3 Replies View Related

Access Objects Within A 2nd Database

Jan 4, 2006

Any ideas on how I can get a list of the names of the queries and tables within a different database?

For example, from db1 I want to get a list of the names of the queries and tables within db2.

Thanks!

View 3 Replies View Related

Is It Possible To Loop Through System Objects?

Jul 25, 2006

Is it possible to loop through all forms within a project and look at its controls? I was requested to change some object names to a more generic name, but I would like to find all references of the form within the Access application. Is there an easy way to do this?

I know that the MSysObjects contains the listing of all forms, but I don't know how to generically type cast a local variable to the form name listed in the table.

Does this make sense? There has to be a way to do this, but I haven't found anything in searching this forum.

Thanks in advance.

CHuck

View 2 Replies View Related

Database Objects Have Gone Missing!

Jul 28, 2006

We have an Access 2000 db, which has been used for some time and is split between a front and back end. We've come in today and tried to open the back-end, which contains only tables, and when it opens it's completely blank. We can't see any of the objects or the normal menu to access the tables, queries, etc. We can, however, import the tables into a new database, so they must be there.

Any idea why this has happened or how to stop it happening again.

Thanks.

View 8 Replies View Related

Mde Error!!! Any Other Way To Secure Db Objects?

Sep 6, 2006

Im unable to create an MDE file, access keeps trying and then saying that its unable to create MDE.//// Is there any other way that I can secure both my codes, forms, modules and macros from being imported into another database since I cant create the MDE file?

View 6 Replies View Related

Finding Duplicates In Two Different Objects

Nov 1, 2006

Hi

Is there a way of finding duplicate field entries in a table and a query: e.g.

In the Sickness Query (which contains, say 10 fields), in the Section field, it says "Benefits", and in the Week Commening field, it says "15/10/06"

And then

In the Nil Return Table (which only contains the Section & Week commencing fields), they also say "Benefits" and "15/10/06"

If there is a way of finding them, how do I delete the entry that has been made in the Nil return table?

Thanks

Maria

View 4 Replies View Related







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