User Profile

Collapse

Profile Sidebar

Collapse
TylerBennett
TylerBennett
Last Activity: May 24 '17, 03:43 PM
Joined: Apr 16 '17
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • The code does work however I have one hiccup,

    Correct Input:
    Code:
    s11
    s22
    Upon "save" this does save, perfect

    Incorrect input:
    Code:
    p11
    p22
    Upon Save "Error" message appears, perfect

    Incorrect input:
    Code:
    p11
    s11
    Upon save, "Error" occurs, perfect

    Incorrect Input
    Code:
    s11
    ...
    See more | Go to post
    Last edited by TylerBennett; May 24 '17, 03:42 PM. Reason: typo

    Leave a comment:


  • Thanks for responding,

    I will start messing around with this code but if you or somebody gets to it, a couple questions:

    1) Would I put my above code within the if statement or after the statement?

    2) What does the suggested code do, particularly with regard to the "* [^s]*" ?

    Thanks.
    See more | Go to post

    Leave a comment:


  • Thanks NeoPa, I was aware of that usage but the tab didn't seem to work with my system. Turned out it was more of the scanner's issue than it was an error with access.

    This was fixed by recognizing all serial numbers started with an 's' which allowed me to use the 's' as the delimiter.
    See more | Go to post

    Leave a comment:


  • Thats fair and no worries all constructive! I just figured marking it as best answer would remove it from being an 'unanswered question'
    See more | Go to post

    Leave a comment:


  • TylerBennett
    started a topic Error Handling: Incorrect Information Input

    Error Handling: Incorrect Information Input

    I have a textbox in which the user will be entering serial numbers (all desired data is in the form of: s********) representing "type"(seri al number - s) followed by the number.

    I have a split function that inputs the data based on the delimiter 's' shown below:

    Code:
    Dim InputString() As String
    Dim i As Integer
    InputString = Split(InputName, "s")
    For i = 1 To UBound(InputString)
    ...
    See more | Go to post

  • Altering Access to use either tab/return as a delimiter for split() function

    Currently I am working on a serial number inventory database. When I was testing functionality, I was using the split function with the space as a delimiter, shown below:

    Code:
    Dim InputString() As String
    Dim i As Integer
    InputString = Split(InputName, "    ")
    For i = 0 To UBound(InputString)
        CurrentDb.Execute "INSERT INTO InventoryInputT(InputID) VALUES ('" & InputString(i)
    ...
    See more | Go to post

  • Remember to select the best response if the answer is complete.

    Further (not that I know much),

    could it be possible to use a validation rule or VBA while implementing
    Code:
    Now()
    My only experience with Now() is the default value for a date&time setting.

    Theoretically if you can use Now() in the expression builder then
    1) Input date <= Now()

    Theoretically if you can use...
    See more | Go to post

    Leave a comment:


  • Post the code that created this error. It will be easier to help you fix the issue than someone stating "this error is because of ____"
    See more | Go to post
    Last edited by TylerBennett; May 9 '17, 05:50 PM. Reason: typo

    Leave a comment:


  • Apologies, I was stuck in the line of thinking of my previous problem that I was viewing incorrectly.

    Due to the fact that each record is guaranteed to be unique upon entry (no record in the same table will have the same values because serial numbers are unique), this is simply an unmatched union query between two separate tables.

    Thus, the answers to my above questions are:
    1) use unmatched union query (query...
    See more | Go to post

    Leave a comment:


  • Proper way to deal with serial numbers of inventory stock catalog

    The end goal is to have data input (various serial numbers) along with data output (various serial numbers) handled such that I can continually update the database with the "remaining data" (any nonidentical serial numbers). If my data tables are such that:

    Code:
    InputData
    serial1
    serial2
    serial3
    serial4
    serial5
    and

    Code:
    OutputData
    serial1
    ...
    See more | Go to post

  • Thank you for the response although I realize now I have going about the wrong method, the data input is simply serial numbers (each input will always be unique) and thus my goal is to simply delete any identical records between the two tables... I will post another question because i'm not sure the best method to go about it but thanks for this response!

    (I'm working on proper question formatting haha)
    See more | Go to post

    Leave a comment:


  • Using SQL/Queries to display two unique 'count' fields (inventory in,out counts)

    My end goal is to have a simple inventory system, (a bunch of data input, counted, subtracted against a bunch of output data, which is also counted)

    Currently this is done in the same table (from advice to not have separate input and output tables) which results in something like:
    Code:
    Table: InventoryData2
    ID    InputID    OutputID
    1      data1
    2      data1
    3      data2
    4      data3
    5
    ...
    See more | Go to post
    Last edited by TylerBennett; May 2 '17, 08:16 PM. Reason: fixing code apperance

  • I was informed on another forum that the issue arrised from the SQL code that contained "FROM InventoryInputT , InventoryData2" ... that effectively compared ALL rows from both tables and presented the data.

    Removing the InventoryInputT from that FROM search fixed the issue!
    See more | Go to post

    Leave a comment:


  • Access multiplies my query count by 38... why?

    ID - InputID

    1 - data1
    2 - data2
    3 - data2
    4 - data2
    5 - data6
    If I run a query that produces the count of each data input:
    Code:
    SELECT First(InventoryData2.InputID) AS FirstOfInputID, Count(InventoryData2.InputID) AS InputItemCount FROM InventoryInputT, InventoryData2 GROUP BY InventoryData2.InputID HAVING (((Count(InventoryData2.InputID))>=1));
    Which, based on the data, SHOULD...
    See more | Go to post

  • This is brilliant ^
    See more | Go to post

    Leave a comment:


  • Yes thank you very much for the input.

    Admittedly most of that went over my head (stock check and control) but it gives a path to try to go down if what i'm doing doesn't work.

    Phil I like that idea but at the moment the database will be very basic and more or less just be a representation of the items made and moved (not much regard for where it's going).

    This was why I have it set up as an input and output...
    See more | Go to post

    Leave a comment:


  • Disregard the Disregard,

    the code above hasn't been changed. The macro mentioned in the disregard is still there.

    The issue appears whenever I close the form. For example, I enter "data1 data2 data3" and press save, the data saves as 3 individual fields as I want, with "data1 data2 data3" still appearing in the textbox. There is no issue here.

    Once I close the form, if the "data1...
    See more | Go to post

    Leave a comment:


  • Disregard,

    I had an 'undue button' that ran a macro to navigate to a 'new record' when clicked. I didn't realize this worked to 'save what was in the textbox' before moving to a new record.

    I switched the macro for
    textboxname.val ue = null and it seems to have solved the issue...

    However I'm not sure why that macro for a 'undo' button would affect the code for my 'save input' button and why the 'docmd.close...
    See more | Go to post

    Leave a comment:


  • Issue with Duplicate items on DoCmd.Close acForm command

    My current code (which handles multiple string input's and creates individual fields based on the delimiter through the split() function is:
    **Currently the DoCmd.Close is commented out.

    Code:
    Private Sub SaveInput_Click()
        
    Dim InputString() As String
    Dim i As Integer
    
    InputString = Split(InputName, " ")
    For i = 0 To UBound(InputString)
        CurrentDb.Execute "INSERT
    ...
    See more | Go to post

  • Suggesting for Creating an Inventory Database with respect to datahandling

    I am currently working on an inventory database for my work.

    As i've progressed in developing it I have been thinking about the best method for handling the difference in input and output data to create a 'remaining inventory'

    Currently my line of thinking is:
    Have a form to receive input data... creating an input data table
    Have a form to receive output data... creating an output data table
    ...
    See more | Go to post
No activity results to display
Show More
Working...