Modules & VBA :: Overlapping Text In A Bookmark?
Nov 4, 2013
I send a picture (transparent png) from access 2010 to a word bookmark and would like to place it overlapping the text.
With wdDoc
.Bookmarks("Signature").Range.InlineShapes.AddPict ure "mysignature.png"
.Bookmarks("Signature").Range.InlineShapes.ShapeRa nge.WrapFormat.AllowOverlap = True
Sending the picture works fine but how can I define the overlapping as the second line does not work?
View Replies
ADVERTISEMENT
Aug 20, 2014
I have an Access form that is tied to a recordset. When I Set Focus on 1 text box in particular, I move the caret with the keyboard arrows left-right, and the caret moves and flashes on top of the text characters, basically overlaps the character. When I then try to delete or edit the text, it moves the caret by itself to a different location in the text box and starts adding the text to that location. When I finally get the text how I want it, I set focus on another control, and it occasionally deletes random characters in the text box.
The only way I have been able to work around this is to copy and paste the current text into Notepad, edit it there, and then paste it back into the text box.
View 14 Replies
View Related
Jul 11, 2013
I have this code:
Public Sub cmdRequery_Click()
Dim vFlag As String
vFlag = Me![EncounterNbr]
Me.Requery
With Me.Recordset
.FindFirst "[EncounterNbr] = '" & vFlag & "'"
Me.Bookmark = .Bookmark
End With
The user starts on a continous form and opens a record, makes some changes, and then when that form closes it triggers this public sub.
The code does what I want it to do in that it returns to the last encounter number that was selected (now on the continous form again) and it requeries and shows anything that was changed about the record on the form that was closed before requery.......
But it always resorts and moves it and I want it to stay in the same spot unless the user sorts. Is there any way to make that happen?
View 9 Replies
View Related
May 10, 2007
Here's a good one for the experts...
I have a query that sums downtime on equipment. The problem that I came across is that there can be multiple status items open up on the same piece of equipment. When the restored time on one status item occurs after the down time of another, the query still adds the total down time of both status items which is giving me greater downtime than there actually is.
Is there a workaround for this?
Thanx,
MJ
View 3 Replies
View Related
Oct 3, 2005
This should be a simple one, but right now I just can't get it.
How do I get a Bookmark to pick up on the entry that I chose from in a combo box when there are multiple entries for the same item I want to chose from (ID - primary key is unique, just not the name of the item - 'FullP', and that is what I am using)?
For instance I want to be able to choose the correct record where 'FullP' will have multiple entries, but unique ID's.
Originally I had this bookmark off of a set of cascading combo boxes on a form, but unfortunately when using this set-up the ID (primary key) is not transfered foward, the rest of it works fine and it takes me to the first record for each 'FullP' (just not the correct record when multiples are entered). The record source for the combo is similar to:
“SELECT [LDetails].MDay, [LDetails].Session, [LDetails].DL, [LDetails].FullP “ & _
“FROM [LDetails] WHERE (((([LDetails].MDay)=Forms![DEntries]!EDay) “ & _
“And ([LDetails].Session)=Forms![DEntries]!Session) “ & _
“And ([LDetails].DL)=Forms![DEntries]!DL) “ & _
“ORDER BY [LDetails].FullP, [LDetails].ID;”
AND
Dim Rs As Object
Set Rs = Me.Recordset.Clone
Rs.FindFirst "[FullP] = '" & Me![FullP] & "'"
If Not Rs.EOF Then Me.Bookmark = Rs.Bookmark
Rs.Close
When changing the final combo box and binding it directly to the query, the primary key is transfered foward correctly, but I am still having problems getting it to go to the correct record.
I have added:
Dim Rs As Object
Set Rs = Me.Recordset.Clone
Me.RecordsetClone.FindFirst "[FullP] = '" & Me.FullP.Column(0) & "'"
If Not Rs.EOF Then Me.Bookmark = Rs.Bookmark
Rs.Close
This just takes me to the very first record...
I would really like to keep the cascade combo boxes working.
Any ideas?
View 2 Replies
View Related
Jun 13, 2005
I have a search form (Form A) that as I type in a text box the contents of the listbox refreshes to show only those items that match the text in the text box.
When you double click on any of the items in the listbox it jumps me to a detail form based on the ID field.
On the detail form, there is a subform for any notes which uses a listbox (it lists all the notes entered for that detail item).
The notes subform listbox is only displaying the first note entered in the database....
So if I search for information in case 43, I find case 43. I double click on case 43 and the details for case 43 pop up. I go to the notes subform and the listbox showing all the notes entered is only showing the notes for case number 1.
Any thoughts?
View 6 Replies
View Related
Aug 7, 2007
I've found a few posts about this subject, on the forum, so I'm guessing that my database (or at least one table therein) has become corrupt.
I've tried the various suggestions I could find (compact and repair, import into a new Db, etc) and none have worked. I have, however, located a version of the database from the day before this error first occurred. I've checked the problematic table and it contains no 'Error#' lines.
The single table affected contains a lot of data and is pretty irreplaceable. I have daily backups, so no information will actually get lost, but if I can't add any new data to it (for fear of corruption) it won't be much use.
1) What causes this problem? I can't seem to find a definite answer to this one.
2) Is there one definite fix I can use to prevent the problem occurring again?
View 6 Replies
View Related
Feb 17, 2005
Hi, I am having some weird problems when using bookmarks. All I want to do is display 1 record at a time in a listbox each time a user clicks a button.
At the moment I save the bookmark value to a global variable, and when the user makes another click is should move to that record. Right now it gives me a "Not a valid Bookmark" error when I click on the button for the second time. First time is alright, but second time it comes up with that error. Any help is appreciated.
Here's an example of my code
Option Compare Database
Dim varbookmark As Variant
Private Sub cmdadd_Click()
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Set cnn = CurrentProject.Connection
strSQL = "SELECT * " & _
"FROM tblHotel"
rst.Open strSQL, cnn, adOpenStatic
With lstHotel
.ColumnCount = 4
.ColumnWidths = "1in;"
End With
Do While rst.EOF <> True
If varbookmark = "" Then
lstHotel.AddItem rst!Name
rst.MoveNext
varbookmark = rst.Bookmark
Exit Sub
Else
rst.Bookmark = varbookmark
lstHotel.AddItem rst!Name
rst.MoveNext
varbookmark = rst.Bookmark
Exit Sub
End If
Loop
End Sub
View 1 Replies
View Related
Jun 16, 2007
Hi
I need to know how to avoid from overlapping between times per date when the user is isernt a new data.
I thought to use dllookup function but it finds one result but if there is more than one result.
Date Ent Ext
1/1/2007 8:00 17:00
1/1/2007 9:00 16:00
1/1/2007 10:00 15:00
In this case there is overlapping and I need a code that avoiding this situation.
Thanks
View 1 Replies
View Related
Sep 9, 2005
Hi,
I have developed a small hotel booking system which inserts records into a reservations table. The table looks like this:
[ReservationNr][StartDate][EndDate][RoomNr]
I am now trying to add a constraint which prevents a room from beeing booked twice on the same day, hence the time period defined by StartDate and EndDate in a record must not overlap with another record.
Is Access capable of adding such a constraint?
It was easy to add a constraint that prevents a booking where the StartDate is before the EndDate, but this one needs to reference already existing records.
Any help would be much appreciated.
Thanks
View 2 Replies
View Related
Dec 23, 2014
I have a report whose fields are arranged in a table:
I need all fields to be able to grow in the event that there's more text than the box can hold, so I have all fields "Can Grow" property set to Yes.
However, when any of the top row fields (Field1, Field2, Field3) need to grow, the entire top row grow but the bottom row stays put and doesn't move down, which causes the top and bottom rows to overlap -- like below (look at ID # 4):
Green is the top row, Blue is bottom row:
how I can get the bottom row to move down when the top row grows?
View 3 Replies
View Related
Feb 6, 2008
Hi,
I tried to search the forums for an answer but I still can't seem to solve the problem.
I receive the "Not a valid bookmark" error message when attempting to open my database. I have tried the compact tool through access and also jetcomp but it just brings up the same error message on access and says "error compacting database" on jetcomp. Can anyone provide a solution to my problem in order that i can either open the database or else retrieve data from it?
Many thanks, any help appreciated
Jon.
I have attached the database in case you have any software which might be of use.
View 1 Replies
View Related
Sep 21, 2005
Hi all,
one of the databases at my place has started acting really strange and was wondering if anyone knows what could possibly be wrong?
there's only one big tble holding about 7.5 k records with approx 10 fields
info that was entered yesterday has now been deleted (by access?) and when you scroll down or go down to the end records, all those records that were there yesterday now show either #error or #deleted and then an error popup appears saying "Not Valid Bookmark"
The UID doesn't appear to be working either, i.e it's not incrementing properly?
any ideas?
View 2 Replies
View Related
Sep 16, 2006
I have made several extractions from back ups from our ERP system using maketable querys. Each time when I renamed the table after running the maketable query. I now want to add them to create one big table showing the records which I extracted. I now found that each time when I extracted from my back up tapes there was a little overlap in time which gives me double entries when I use an append query to add them al together.
Is there a way to set parameters which filter our double entries and only adds the unique records to this table?
View 1 Replies
View Related
Nov 5, 2013
I have a knowledge base database which lets the user search for articles containing answers to common problems and issues. Some of the users want to be able to bookmark certain useful articles. The DB is a front end/back end design so I am thinking if I have one table stored in the front end which can be used to store that particular user's favourites then that would be great. However, I a little stuck on how to implement this. Ideally, I'd like a simple checkbox option next to each article, which when ticked, would store that article ID in that user's local front end.
View 3 Replies
View Related
Nov 2, 2013
I have in the current event:
Private Sub Form_Current()
If Not Me.NewRecord Then
With Me.Q_Subform.Form
.RecordsetClone.FindFirst "N=" & Me.N
.Bookmark = .RecordsetClone.Bookmark
End With
End If
End Sub
The problem is that when the Q_Subform has no records I have the error 3021.
How can manage it. It's the last step before ending My db
View 3 Replies
View Related
Feb 24, 2014
I'm trying to create a report that pulls from two tables [tblTelephony] and [tblSales]. All data in my query is limited to a date range entered through a form.
For every record in [tblSales] (showing the agent made a sale) there is a record in [tblTelephony] (showing all the stats for the agent's day worked). [tblTelephony] has one date for each record. [tblSales] has two dates for each record. The sales dates are the date the services were ordered (matches the date worked in [tblTelephony]) and the date the services were installed.
In order to get an agent's MTD Sales stats I have to query the date range on Install dates. MTD Telephony stats are run on the same date range on telephony date. Where I run into an issue is with the sales that are ordered before the date range in question and installed during it.
I've run a separate query to sum the sales installed during the date range and used that sales value in my Telephony query. In order to get my data to show as accurately as possible, I had to create a relationship between the Order Date and the Telephony date. I'm really hoping to find a way to force the sum of sales in sales query to show in the sales column in the telephony query, regardless of the telephony date range and without adding telephony data for dates outside the range.
Example:
Date Range = 2/1/14 - 2/24/14
Telephony Date = 2/3/14
Order Date = 2/3/14
Install Date = 2/14/14
Appears on report
Date Range = 2/1/14 - 2/24/14
Telephony Date = 1/31/14
Order Date = 1/31/14
Install Date = 2/3/14
Does not appear on report
How to get the sale example on the bottom to show without removing the relationship?
View 4 Replies
View Related
Jul 6, 2005
Ok....Just when you think it's all running smoothly.... :(
I have a combo box, MDLastName, with a column count of 9, with column 2 displaying and all others hidden. The selection made with this combo populates 7 corresponding fields (first name, address, etc). It's working perfectly.
The first problem I encountered was with identical last names, but different corresponding data. When I selected Jones, for example, it would populate the first Dr. Jones and his info, listed in the table. However, if I selected the second Dr. Jones in the combo list, it was still populating only the first Dr. Jones' info. I resolved this by binding the fist column (ID, aka primary key), but still hiding all colums but column 2. First problem fixed..
Next, I have a Word Template document bookmarked to receive data from the form, frmDenial. I have all the coding working fine and dandy to insert the data from the fields on the form, save, and print. However, instead of inserting the text from the MDLastName, it is inserting the primary key (because it is the bound column in the combo box). Now, because of the first problem discussed above, I cannot change the bound column to column 2 (containing the data I need in the Word Template). How can I get the right info to appear in my template with the bookmarks?
View 1 Replies
View Related
Jun 30, 2014
I'm creating an equipment hire database, and I was wondering how I would not permit overlaps of equipment hire ie. equipment being borrowed before it is returned. I have a query that lists all bookings that overlap, but I am unsure of how to implement this into the table to prevent overlaps.
The SQL for the query is as follows:
SELECT Bookings.[Booking ID], Bookings.[Instrument ID], Bookings.[Borrow Date], Bookings.[Return Date], Bookings_1.[Booking ID], Bookings_1.[Instrument ID], Bookings_1.[Borrow Date], Bookings_1.[Return Date], ([Bookings_1].[Borrow Date]>[Bookings].[Return Date]) Or ([Bookings_1].[Return Date]<[Bookings].[Borrow Date]) Or ([Bookings].[Instrument ID]<>[Bookings_1].[Instrument ID]) Or ([Bookings].[Booking ID]=[Bookings_1].[Booking ID])
[Code]...
View 7 Replies
View Related
Feb 16, 2015
I have a form (frmMain) which has a header with some basic links and text boxes I would like to keep as a frozen pane on top as the user are scrolling down the detail section of the form. The detail section does include a subform if that makes a difference (frmhome). When going to Options>Current Database> tabbed documents, the form header stays frozen perfectly.
I however would like to use "Overlapping windows" as the form center aligns in the Access window instead of left aligning when using "tabbed". So either :
1) how do I keep the header frozen in "overlapping" or
2) how do I center align the form in "tabbed" view, as right now the form just wants to go as far left as possible in the full Access window.
View 1 Replies
View Related
May 21, 2013
I have a yes/no field as a book mark in a table with names. How can I query it to open to the last or the first check?
View 13 Replies
View Related
Feb 1, 2013
I understand how to pass text boxes to bookmarked locations in Word, but when it comes to combo boxes, list boxes, or option buttons, I am lost. So, my problem this time is the following:
I have an access user form that is asking the user to input data and make selections. Once entered I am trying to get everything to export directly to respective bookmarked locations in a Word Report. I have my text boxes working and I have the combo box now working. The issue I am experiencing is with the user making multiple selections from a list box and I am not really sure how to get that to export to the word document.
Here is what I have:
Code:
Dim strNames As String
Dim ctl As Control
Dim varItem as Variant
'ensure the user has made a selection from the testers name text box
If Me.testersNamesText.ItemsSelected.Count = 0 Then
MsgBox "You must select at least 1 Capability Testers Name"
[Code] ....
I am very new to trying to code with the Visual Basic side of things, I know this is probably the best method to do this but the issue that I am experiencing is receiving a Null error for the line with
.Selection.Text = (CStr(Forms!WebBasedIFV!testersNamesText))
And when I attempt to pass the strNames in place of the testersNamesText I receive that the user form can't find the field "strNames" referred to in my expression.
View 7 Replies
View Related
Jul 24, 2015
We need to move rich text from an Access memo field to a Word text box. So far the best Ive been able to come up with is in the code below. In this code pprs!What is a record set field of a table memo field that is bound to a text box enabled for rich text. The rich text seems to be stored as html as so I can get word to convert it by enclosing it in html tags.
Dim What As Word.Shape
Set What = doc.Shapes.AddTextbox(msoTextOrientationHorizontal , doc.PageSetup.LeftMargin, 225, 534, 0)
Dim sPath As String
sPath = "G:Temp.html"
Open sPath For Output As 1
Print #1, "<HTML>" & pprs!What & " </HTML>"
Close #1
What.TextFrame.TextRange.InsertFile (sPath)
View 2 Replies
View Related
May 13, 2014
I have a form on which there is a series of text box controls relating to different frequencies. At the moment I enter a value in to each of these manually.
However, I would like to have an unbound text box where I can paste in all the values (6 or 8 of them) from excel and then press a button and they would be copied in to the individual boxes.
So far I have my design:
I'm not sure where to start with regard to the code as I don't know how to handle delimited text - is it column delimited in excel?
I imagine some sort of loop, such as a do until will be required but again not sure.
View 2 Replies
View Related
Sep 5, 2013
I have some vba where I'm importing a text file and splitting it out into a table. For the most part its working just fine.
But I have a line of data that I need to pull out the string right after "Old" - Murphy and right after "New" ZMurphy
Acc# : 111111 This is test data, Person : 22222 Old Murphy New ZMurphy
I'm thinking Instr() could do this but I'm unable to get it to work.
I am using Access 2010...
View 3 Replies
View Related
Jun 5, 2013
I'm trying to figure out at what point an error message occurs while a database is closing. This problem only occurs if someone clicks on the red close button on the top right of the screen when there are several forms open. If the user exists normally there is NO problem.
I am attempting to use the print statement to write to a text file to track what is happening as the database shuts down. Unfortunately, the open (print) statement, when issued, zaps any prior contents which precludes having a full printed record. I am hoping for a print syntax that would allow appending.
Code:
Open "ErrorReport.txt" for Output as #1
Appended text to the file to show what is happening in that event.
Close #1
The program, in closing, does stop with an error message that a certain file can't be found. But when I click on debug, the program simply closes. I have also commented out VBA references to the file that can't be found, but the error still persists .
View 2 Replies
View Related