Modules & VBA :: How To Edit A Publisher Text Box

Jun 25, 2014

I'm currently using the following to edit a publisher document using access VBA.

Code:
For Each pubShape In pubDoc.Pages(1).Shapes
If pubShape.HasTextFrame Then
If pubShape.Name = "Text Box 440" Then pubShape.TextFrame.TextRange.Text = Item1
If pubShape.Name = "Text Box 441" Then pubShape.TextFrame.TextRange.Text = Item2
If pubShape.Name = "Text Box 442" Then pubShape.TextFrame.TextRange.Text = Item3
If pubShape.Name = "Text Box 443" Then pubShape.TextFrame.TextRange.Text = Item4
If pubShape.Name = "Text Box 444" Then pubShape.TextFrame.TextRange.Text = Item5
If pubShape.Name = "Text Box 445" Then pubShape.TextFrame.TextRange.Text = Item6
If pubShape.Name = "Text Box 446" Then pubShape.TextFrame.TextRange.Text = Item7
If pubShape.Name = "Text Box 447" Then pubShape.TextFrame.TextRange.Text = Item8
End If
Next

Obviously there are a lot of shapes/boxes etc in the document and this code is very inefficient and takes a few moments to complete. Is there a way to directly reference a text box and change its value. For word I have been using bookmarks but this doesn't seem to work with publisher.

I'm looking for something like pubshape.Value("text Box 440") = Item1 but cannot find the correct syntax.

View Replies


ADVERTISEMENT

Modules & VBA :: Open Specific Publisher Document If Criteria Is Met

Jul 16, 2014

The code below allows me to open a publisher document that is already merged to the current record. What I need is to allow the user to open the document according to the group they are reviewing. How to accomplish this?

For example:

IF Group = A1 OR B1 THEN OPEN AB_1.pub
IF Group = A2 OR B2 THEN OPEN AB_2.pub
IF Group = A3 OR B3 THEN OPEN AB_3.pub

Dim pubApp As Publisher.Application
Dim pubDoc As Publisher.Document
Set pubApp = New Publisher.Application
Set pubDoc = pubApp.Documents.Add.Application.Open("c:Publishe rAB_1.pub)
pubDoc.ActiveWindow.Visible = True

View 3 Replies View Related

Disable Edit In Text Box

Dec 11, 2005

I would like to disable editing in a text box once the information has been entered initially, but would like to be able to turn editing back on by double clicking the text box label. This is to be used for a database I'm creating for truck fleet management. Any ideas??

View 4 Replies View Related

Data Disappearing From Unbound Text Boxes Upon Edit.

Jan 12, 2006

Hello,

I have a form that utilizes a combo box called cboProgAddr (for Program Address). The cbox has 5 columns each of which fills in an adjacent text box. Since I needed the option of making corrections to these text boxes once they were filled in I need to set them up as unbound via the following code in the After Update event of cboProgAddr:

Private Sub cboProgAddr_AfterUpdate()
Me!txtProgStreet.Value = Me!cboProgAddr.Column(1)
Me!txtLocStreet.Value = Me!cboProgAddr.Column(1)
Me!txtProgCitySt.Value = Me!cboProgAddr.Column(2)
Me!txtLocCitySt.Value = Me!cboProgAddr.Column(2)
Me!txtProgZip.Value = Me!cboProgAddr.Column(3)
Me!txtLocZip.Value = Me!cboProgAddr.Column(3)
End Sub

As you can see it puts each field of data into two separate text boxes. Here's the issue: If I have to go back to the form after the original data entry the following boxes are blank...

txtProgStreet
txtProgCitySt
txtProgZip

while the following retain the orginal data...

txtLocStreet
txtLocCitySt
txtLocProgZip

The original cboProgAddr maintains its original data. All six fields above are stored in the same table as text field. I'd like all the boxes to maintain the data from the original input.

I'm totally baffled why this is so. I've attached images of the combo box control functions if that helps.


Thanks,
David

View 1 Replies View Related

Publisher Could Not Be Verified

Jan 3, 2008

Is there any way to get rid of this message?

I am running an Access 2003 mde file across an intranet and want to remove this error so the users do not have to contend with it.

The users are going to gain access to the file via link on the "home" page.

I know this is an issue with IE but I only have limited authority so any "backdoor" way of getting rid of this would be greatly appriciated.

Thanks

tgi171:confused:

View 1 Replies View Related

Linking Photos To Publisher

Jan 29, 2006

Hi,
I've got some id card templates in publisher than i want to merge in access.
i can merge the text details into access but i dont know how to link the photos. should i store the file path of the image in the database or should i embed the file.

would this work with publisher or do i need to use some code?

any help on this would be appriciated as i have no experience with pictures in access.

Thanks

View 1 Replies View Related

Hyperlink To Publisher Doco

Jan 17, 2007

In an access table I have hyperlinks to various documents mainly word docs. I have recently added a Publisher doc and when I H/L to it it will open the application but not the doco.

Obviously Publisher behaves differently than Word in this regard.

I do need the link to open the doc. Is there a way around this please?

Thanks

Peter

View 3 Replies View Related

Publisher Displaying Name.. Now Just Displays Numbers?

Apr 4, 2005

I have a list of publishers for software titles in a table.

1=Adobe
2=Macromedia

and so on and so forth.
I have a form that pulls the publisher name and displays it, and it used to display correctly with the NAME but now all of a sudden it's displaying the publisher number "1" instead of "Adobe"

what's going on?

View 1 Replies View Related

How To Add A Site Or Publisher To Trusted List

Oct 22, 2011

In 2007 how do you add a site or publisher to your trusted list.

View 1 Replies View Related

General :: MS Publisher And MS Access Mail Merge?

Feb 22, 2013

I am running windows 7 and access 2007 same with pub When I do a mail-merge from pub I can see some Queries but not all. and thoughts?

View 1 Replies View Related

General :: Pinned Database Won't Open - Unknown Publisher

Jun 16, 2015

I work in three different databases, but for one of them (the main company db), if I right clicked the pinned Access program on the taskbar and click the pinned database, it does nothing if someone else has the file open already. If the file isn't open, it'll pop up with an "Unknown publisher" warning (new, never happened before this), but it'll open the file. If someone has the database open, it doesn't flicker or even try, it just does nothing.

I am able to open Access and click on the database in the "Recent files" and have it open that way. I don't know what to troubleshoot, its like it's not seeing the file, but I can go to the properties on the pinned db and it shows the correct file location. I'm the only one having this issue, the other users here can right click the pinned program and open the file like normal.

I've rebooted my computer; unpinned and removed from list; compacted and repaired; nothing is making a difference.

View 3 Replies View Related

Modules & VBA :: Using ADO To Edit Result Of A Query

Sep 30, 2013

For some reason i've had to make an update on some old VBA projects of mine. In this update i switch all references of DAO to ADO. I know there are some limits to what i can accomplish with ADO (where i would need to use DAO). Anyways in some of these old projects i use an SQL statement to provide me with a limited number of records which i then modify by iterating through the recordset.

I can't get this to work with ADO. It's as if it always expects me to provide a table in the argument.

In short my question is. Is it possible to change the values returned from an SQL statement using ADO

Code:
'This is the DAO version which is exactly what i'm looking to using ADO
strSqlCommandText = "SELECT tblMain.TaskID, tblMain.Heading FROM tblMain WHERE (((tblMain.TaskID)=" & ProcessForm.txtIDValue.Text & "))"
Set objRecordset = pubObjDatabase.OpenRecordset(strSqlCommandText, dbOpenDynaset)
objRecordset.Edit
objRcsToDbTable.Fields("Heading") = ProcessForm.txtBoxHeading.Text
objRecordset.Update

This is what i've done and it doesn't work.

Code:
strSqlCommandText = "SELECT tblMain.TaskID, tblMain.Heading FROM tblMain WHERE (((tblMain.TaskID)=" & ProcessForm.txtIDValue.Text & "))"
Set objRecordset = New ADODB.Recordset
objRecordset.Open strSqlCommandText, pubObjDatabase, adOpenDynamic, adLockOptimistic
objRecordset.Edit
objRcsToDbTable.Fields("Heading") = ProcessForm.txtBoxHeading.Text
objRecordset.Update

I can think of some work around like, creating a temp table and insert/update all the records from there or creating an UPDATE SQL statement.

View 6 Replies View Related

Modules & VBA :: Edit Dataset Works And Add A New One

Aug 4, 2013

I have an edit button in my form which activates VBA, collects all data from the fields and edit the dataset. Everything work fine except the case that next to the edit access adds a new record as well with exactly the same data.

This is my code :

Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("select * from tbllocations where locationid = " & cdkey)

[code]...

I checked every parameter and it seems everything is OK which surely is the base for the correct edit of the dataset. locationid is the key of the table.

View 3 Replies View Related

Modules & VBA :: Edit Specific Row In Table

Dec 30, 2013

I have a report that I run which has PT_Ins_ID in it, I am trying to edit that row with the following code.

Code:
Private Sub cmd_Deact_Click()
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("dbo_Patient_Insurance")
If rs.RecordCount <> 0 Then
With rs

[code]....

I've also tried this.

Code:
Dim rs_PI As DAO.Recordset
Set rs_PI = CurrentDb.OpenRecordset("dbo_Patient_Insurance")

[code]...

View 6 Replies View Related

Modules & VBA :: Edit Replace Via Script Several Changes?

Sep 21, 2014

Within my table 'Contacts' I have the field 'City' which as you would expect contains the city.

The data in the City field which is sourced from the web can often merge two regional municipalities into 1 and I know through digging in behind the data what the correct answer should be.

I am looking to accomplish a list of edit replaces that takes 30 + edits and automates.

Change "ClevelandAkron" to "Cleveland"
Change "Dublin 2" to "Dublin"
Change "Greensboro/Winston-Salem" to "Greensboro"
etc. etc.

There are 10,000 plus entries in the table of which many are correct.

View 2 Replies View Related

Modules & VBA :: Edit Conditional Statements Via Form

Aug 31, 2013

I have a table of marks of student, a query that calculates totals and a form that displays results. on the query, i have an if statement.

Code:
comment:IIf([Marks]>=80,"good",IIf([Marks]>=50,"fair",IIf([Marks]>=40,"Work harder")))

So i want to be able to make the whole syntax available for user to edit without actually doing it in vba. is this possible in vba? i have attached an image

View 8 Replies View Related

Modules & VBA :: Edit Multiple Records From List Box?

May 25, 2014

I have two table. Table 1 (assets) list all my assets etc. Table 2 lists all servicing for each asset.

I have a form which generates a list box of items that require servicing (once servicing has been completed on these items) I would like to update all records, in both tables. Table 2 with all the information about the service. and Table 1 with (only) the next service date.

I have set the list box to allow multiple selection and have used the following code to allow new records to be update in table 2 (which works). but I cant seem to get the code to edit one cell in table 1.

private Sub Command59_Click()
Dim strSQL As String
Dim db As DAO.Database

[Code].....

View 4 Replies View Related

Modules & VBA :: Edit Junction Table - Unbound

Jun 11, 2015

New to access (and this forum) and working on a small db that includes the following tables:

tbl_Orders
tbl_Junction (Order Details)
tbl_Products

While the form itself is bound to tbl_Orders I decided to use unbound text boxes to enter the data (knowing I was in for some work!). Reason is that if textboxes were bound would need to use a subform with multiple combo boxes and that UI did not seem suitable for the application.

I’ve completed the code to add new records to tbl_Orders and tbl_Junction from the unbound textboxes. I'm using the VBA .AddNew method and is working well. Now I need to integrate code that will allow users to edit existing records while they are viewing them on the form.

I have the code to look up the record set I want to edit in tbl_Junction and am familiar with the .Edit method but the issue is that the required changes MAY include not just editing existing records but also deleting and adding new records. For example, the initial order may have been for Apples and Oranges and the revised order may change the number of Apples, eliminate Oranges entirely, and add some Bananas. So, it seems I need to .Edit Apples, .Delete Oranges, and .AddNew Bananas?

Should I try to write code to determine where I need to .Edit/.AddNew/.Delete? -- not looking forward to that. Thought maybe could delete the entire junction record set and then just .AddNew for everything per the revised order. That should work as the display on the form would be correct for the whole order. But maybe would cause a problem as would remove the FK in tbl_Junction that corresponds to the PK in tbl_Orders?

View 14 Replies View Related

Modules & VBA :: Edit JPG To Make Rounded Corners

Apr 21, 2014

Is there some possibility to edit jpg file and do rounded corners via access vba?

I can use command line of Irfanview for copy, resize, etc.of jpeg but I dont know how to do rounded corners ...

View 4 Replies View Related

Modules & VBA :: Edit Font Color Based On Field Value & Age

Mar 4, 2015

I am attempting to adjust the font color of a date field on a report based on the value of two other fields. I have the below code set in the "On Format" property of my detail section - however it does not work when I open the report to view.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Frequency = "Annually" Then
If Me.ClassDate < (DateAdd("yyyy", -1, Date)) Then
Me.ClassDate.ForeColor = vbRed
Me.ClassDate.FontBold
End If
End If
End Sub

View 1 Replies View Related

Modules & VBA :: Edit Subject Line Of Outlook Email

Aug 27, 2014

I'm trying to write a line of VBA code (in an existing Access 2010 DB) that changes the Subject Line of all selected emails in my Outlook Inbox to today's date.

View 1 Replies View Related

Modules & VBA :: Edit Recordset Querydef That Has Calculated Field

Jan 19, 2014

Is it possible to add/edit a record from a DAO querydef that has a calculated field in.

Code:

Set qdf = db.QueryDefs("qryOutput_" & strDept)
qdf.Parameters("Enter Date") = dDate
Set rs = qdf.OpenRecordset()

Using the rs.Edit or rs.AddNew worked fine until I put a calculated field in the query.

The calculated field is just a total of some fields in the table.

I thought this was something to do with dbOpenDynaset but it just keeps having the same error

Cannot update. Database or object is read-only.

View 3 Replies View Related

Modules & VBA :: Edit A String Or Use Wildcard In Search Function

Jul 18, 2013

Access 2007

I can't figure out how to replace a period that is in the middle of a string and end up with 10 digits. For example 55.5555 would be 5500005555. I can use replace() but the tricky part is I have to end up with 10 digits.

Ultimately what I'm trying to do is - when a user enters 55.5555, 555.5, 5.5 or any variation they will be able to find the corresponding record. So a wildcard for the search or the replacement of the "." with enough zeros for 10 digits.

Here is what I'm using now - i making them enter the full 10 digit number but would like to give them the ability to use the period in place of the zeros.

Function Search()
Dim lssql As String
Dim lsSn As Recordset
Dim db As Database
Dim lsMessage As String
Dim sMsg As String
Dim vRetVal As Variant
Set db = CurrentDb()

[Code] .....

View 2 Replies View Related

Modules & VBA :: Word Doc With Command Button - Edit Mode

Oct 2, 2014

I have a Word Doc with a Command Button.

The Command Button loads a form.

How do I find the form in "Edit Mode"

Alt-F11 opens the VBA editor but I don't seem to be able to locate the form there.

View 1 Replies View Related

Modules & VBA :: Edit Recent Files Of Access Database

Mar 18, 2014

Is it possible to edit the recent files of a access database?

We have a main database (version control database) from where you can open a database which is located on a network drive.

By selecting the datbase you need from a dropdown menu, access will check which version you have locally. If there is an updated version available on the network it will download this updated version, overwriting the old one. The 'main' database is then closed and the local version of the database you needed is opened.

The problem is that this local database is mentioned in the recent files history so people are able to bypass using the main database.

In Excel you can clear the recent files with application. Recent Files setting the maximum to 0 and back to original again. In Access you do not have this option.

Where I would be able to find this option. Ideally I'd like to only take out a specific databasename from the recent files, rather then resetting the full list.

View 2 Replies View Related

Modules & VBA :: Form Bound To ADODB Recordset Is Read Only - Cannot Edit?

Sep 4, 2013

I can't make edits with ADODB recordset bound to my form.

Access 2010 linking to SQL Server 2008.

Simple form bound to a single table.

Connection string works fine.

Code is as below (cursor etc is set using enums btw).

Private Sub Form_Open(Cancel As Integer)
Dim rst As ADODB.Recordset
If g1OpenRecordset(rst, "tblName", rrOpenKeyset, rrLockOptimistic, False) = False Then
Cancel = True
Exit Sub

[Code] ...

View 3 Replies View Related







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