Results 1 to 5 of 5
  1. #1
    bakerri2 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    3

    Others have trouble seeing records in data base

    I have been tasked with building a database for the company I just started working for. I've had no issues really creating the database for the most part. I have worked out most of the kinks and tweaked the forms to fit our needs over the last few days. One problem that I have not been able to fix is on the form attached.
    Click image for larger version. 

Name:	frmedit.jpg 
Views:	16 
Size:	66.1 KB 
ID:	17339 Click image for larger version. 

Name:	frmeditdesignview.jpg 
Views:	16 
Size:	184.8 KB 
ID:	17340

    On my computer and one of other engineers computer we are both able to pull up all the records, but the other 2 engineers in the office are only able to pull up one record when they search.

    the things I have checked on this form is
    1) master/ child link
    2) .mdb/.accdb format
    3) file location for linking files ( I put it all in one database to see if it was an issue with the table links)

    I am at a loss on how to troubleshoot this issue and what my next step should be. Below is a bit of code that I have on one of the buttons for search. if you have any ideas I would be greatly appreciative.

    Private Sub cmdsearchprojectnum_Click()
    Dim projectvalue As String
    Dim SQLstr As String
    Dim db As DAO.Database
    Dim qdf As DAO.QueryDef
    Set db = CurrentDb()
    Set qdf = db.QueryDefs("qrycheckout")


    Me.Combo24.RowSource = "SELECT tblAssemblyGroup.AsmGrp, tblAssemblyGroup.AsmGrpID FROM tblAssemblyGroup"
    Me.Combo43.RowSource = "SELECT..........."
    Me.Combo43.DefaultValue = ""
    Me.Combo24.DefaultValue = ""


    'projectvalue = Me.txtProjvalue.value
    projectyear = Left(Me.txtProjvalue.value, 2)
    projectnumber = Right(Me.txtProjvalue.value, 3)

    projectvalue = projectyear & "-" & projectnumber

    'MsgBox projectvalue


    SQLstr = "SELECT........"


    qdf.SQL = SQLstr


    Me!Child21.Form.RecordSource = "qrycheckout"
    Me.RecordSource = "qrycheckout"


    Me.Refresh
    End Sub

    Thanks in advance
    Richard

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Why use QueryDefs? Can just set form RecordSource property with desired sql.

    But I would not change the RecordSource if avoidable. I would set the Filter and FilterOn properties of form.

    Which subform are you filtering and why are you filtering subform? Isn't the subform linked to main form?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    bakerri2 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    3
    Thanks for the reply and I apologize for the time it took me to get back to your comment, sometimes vacation takes precedent over work projects. Lets see if I can answer your questions.

    1) I had tried to set the recordsource property with the sql statement but it would not update the subform when a new selection was made. So the only way that I was able to get the data in the subform was to change the querydefs then requery.

    2) I am filtering the lower subform. the lower subform has all the parts that we have designed in our engineering department and we need to be able to quickly search and modify information connected to that data. this was the only solution I could come up with my intermediate knowledge of vba. Us mechanical engineers aren't always meant to be coders.


    Again thanks for your help

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Can you tell us about your tables and relationships?
    As for your forms and controls, you might wish to name your controls with more meaningful, contextual names.
    Combo24 and combo43 do not convey anything to me.
    It seems ProjectNum is a concatenation of 2 digit year and some number, right?

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    It looks like you are not requerying your combo boxes after you reset the RowSource. You need to do that to update the lists:

    Me.Combo24.RowSource = "SELECT tblAssemblyGroup.AsmGrp, tblAssemblyGroup.AsmGrpID FROM tblAssemblyGroup"
    Me.Combo43.RowSource = "SELECT..........."
    Me.Combo24.Requery
    Me.Combo43.Requery

    You need also to Requery the forms:

    Me!Child21.Form.RecordSource = "qrycheckout"
    Me.RecordSource = "qrycheckout"
    Me!Child21.Form.Requery
    Me.RecordSource = "qrycheckout"
    me.Requery

    John

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 07-08-2014, 06:22 AM
  2. Front end trouble on split Data base
    By Cran29 in forum Access
    Replies: 3
    Last Post: 01-30-2013, 08:53 AM
  3. Open data base
    By stephaj in forum Access
    Replies: 5
    Last Post: 02-23-2012, 09:37 AM
  4. Cannot add records to the data base
    By vagelism22678 in forum Access
    Replies: 1
    Last Post: 09-19-2011, 12:45 AM
  5. Having trouble with dates in my Data Base!!!!
    By BigPhil in forum Queries
    Replies: 4
    Last Post: 02-15-2006, 12:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums