Forms :: Creating A Favourite / Bookmark Flag?
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 Replies
ADVERTISEMENT
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
Apr 18, 2015
I'm trying to create an access database to make an inventory of my model trains.
I have a main entry form (frmTrain) where I enter all sorts of info regarding e.g. a locomotive. This info is then stored in a table (tblTrain).
In the main entry form, I've put a combo box (cmbCountries) linked to a query (qryCountries) which queries the country codes from a table (tblCountries) that has three fields:
ID (autonumber)
CountryCode (short text) (containing the country codes UK, FR, DE, ...)
FlagFile (short text) (containing the name of the flag picture, e.g. UK.png)
The flags are stored as *.png files in a folder Flags that is in the same folder as the database file. I have chosen this approach instead of putting the flag pictures in an OLE field in tblCountries because I'd like to avoid being stuck to *.bmp files (don't support transparency). I'd also like to avoid having to mention the complete file path in the field FlagFile
I created a form (frmCountries) to easily add countries to tblCountries as needed.
Now back to the main entry form. The selection made in cmbCountries is stored in the field 'Countries' in tblTrain. When a country is selected in cmbCountries, I'd like that the corresponding flag is displayed next to the combo box.
I found an example on the web where an image field was used to display the flag, let's say with the following code:
Private Sub cmbCountries_Change()
Me.ImageFieldName.Picture = Me.cmbCountries.Column(2)
End Sub
Private Sub Form_Load()
Me.ImageFieldName.Picture = Me.cmbCountries.Column(2)
End Sub
and where the combo box had as row source (not using qryCountries):
SELECT tblCountries.ID, tblCountries.CountryCode, [Application].[CurrentProject].[path] & "Flags" & [FlagFile] AS Expr1 FROM tblCountries ORDER BY tblCountries.[Code];
The problem with this example is that, if you select in frmTrain e.g. UK, the UK flag is then displayed across all records in frmTrain. So the image field is not the appropriate field to display the flag in frmTrain and I guess an unbound/bound (?) object frame should rather be used.
How to display correctly the flag picture for every individual record in frmTrain corresponding to the country chosen in cmbCountries.
View 13 Replies
View Related
May 20, 2014
I am trying to automate a membership status flag based on comparing today's date and a recorded expiry date. The expiry date control is on a sub-form. I have the following code in the OnLoad event of the master form:
Dim DateGap As Integer
While Me.CurrentRecord < Me.Recordset.RecordCount
If Not Me.NewRecord Then
DateGap = DateDiff("y", Date, Forms!PersonalMasterF!MemberSubF.Form.MemberExpire )
Else
DoCmd.GoToRecord , , acNext
[Code] .....
With debug pointing to the DateGap = statement I get the error 'Invalid use of Null'. As you can see, I've tried to trap any new records it might run into to avoid nulls in MemberExpire, and there are no null values in the MemberExpire field of the underlying table. I've also tried defining DateGap as Variant, which does not work at all.
View 7 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
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
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 1 Replies
View Related
May 2, 2006
Sorry, I tried searching the forums with no luck.
What I need to do is.
I have a table with a field called intervention day, the user then types in that field a date, pretty simple huh.
Well anyway I need the system to some how alert the user when that date comes, either through an information box or whatever.
thanks for any help,
tom harper
View 5 Replies
View Related
Sep 28, 2006
I need a flag(indicator) for my database. This flag would be read by many different functions and depending on the value of the flag, would do one of two things.
Example: If the flag is "A", when I click a button in a form it does "C" function. If the flag is "B", then in case of the previous button it will do "D" function.
What I'm having a hard time with is where to store said flag. Mind you the flag is either one or the other ("A" or "B") for the entire database, not just a specific record(s). I thought about adding a field to my 'master' table and then use an update query to change all the values from "A" to "B" as needed, but that seemed a bit like storing redundant data.
How or where should I store this flag?
View 8 Replies
View Related
Feb 6, 2006
Hey there
there is a function that I wanted to do on my form but can't think of a way
what I want to do is to show up a flag after 14 days and 28 days of a date with missed appointment being ticked
say there are two fields in the section
AppointmentDate
Missed
Will I be able to do this in access?
Please advice
Cheers
Si
View 6 Replies
View Related
Mar 12, 2008
hi I was wondering if anyone knows how to flag dates in access. I have 2 dates entered and I need a flag to appear if the second date is a month longer than the first date entered. Hope this makes sense and hope you can help
View 5 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
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
Jul 8, 2005
Hi, just so you are aware, I am totally clueless when it comes to Microsoft Access. I tried finding tutorials and help online that I could use to do this but I'm having trouble understanding what I'm supposed to do. I have two huge tables linked to each other by an ID number. One table contains multiple records with the same ID number while the other does not. There are records in the first table that don't appear in the second one, and there MAY be entries in the second table that don't appear in the first table. The second table has a flag that I would like to add to records in the first table that appear in the second table. What is the easiestt way to do this? This may be an extremely stupid question or it may be very hard, I'm not sure which, though I'm leaning toward it being a stupid question. Thank you in advance for your help.
View 4 Replies
View Related
Apr 26, 2005
I print a certificate for each person attending my class by sending the form (StudentForm) to a report . To save time I print and sign certificates for all preregistered students then during class I enter all students that enroll the day of class. What I would like to do is flag each preprinted record so when I select the print button after all students are entered into the database all certificates except the preprinted records will be printed. Any ideas on how to flag a printed record?
View 4 Replies
View Related
Jul 3, 2013
I have a list of locations in a sub form where a chart has been and the last record is it's current location. I'm generating a building report which should show a list of charts on that building, but it also shows it on old locations. So in the example, it shows for building 43 and building 83. I just need it to show on 83, how to accomplish this.
View 2 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
Jan 8, 2007
Hi everyone,
I'm aware of the wizard in MS Access that creates a new table containing duplicated entries that have been entered under one column, however, my problem is slightly more complex...
A contractor of mine has recorded information from CCTV surveys of sewers (not very glamorous I know!) in a Microsoft Access database. If you can imagine - the camera can be pushed along a pipe from both ends. Sometimes, the survey is abandoned in one direction and then repeated along the same length of pipe but from the other direction. The database contains (amongst other columns) a "start manhole" reference and a "end manhole" reference.
eg:
16014
As you can see, the information contained by both entries will be the same (as they are the same length of pipe). Therefore, I was wondering how I could get MS Access to:
1. Recognise these 2 entries as duplicates
2. Create a table that hides the duplicated entry with a shorter "SectionLength" value.
Many thanks in advance.
View 1 Replies
View Related
Jun 25, 2013
I need to build a Query that will look at a previous table and a new table and flag any changes...what is the best way to go about something like this?
View 5 Replies
View Related
Feb 6, 2015
I'm using MS Access 2010, how to flag a criteria in an age field like, Pop-up if age is under 14??
View 3 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
Apr 29, 2014
How to implement the procedure of clicking on the flag and hide the field in VBA? I know that want to assign - ColumnWidth=0.
Сomplete procedure fails.
View 10 Replies
View Related